https://github.com/python/cpython/commit/24a8d920c1ec251a389fca6dedfb860d9f4bbc76
commit: 24a8d920c1ec251a389fca6dedfb860d9f4bbc76
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2025-01-14T11:17:20+01:00
summary:

gh-127787: Move _PyUnicodeError_GetParams() to the internal C API (#128803)

files:
M Include/cpython/pyerrors.h
M Include/internal/pycore_pyerrors.h

diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h
index 49a6265e5eb02f..b36b4681f5dddb 100644
--- a/Include/cpython/pyerrors.h
+++ b/Include/cpython/pyerrors.h
@@ -94,12 +94,6 @@ PyAPI_FUNC(void) _PyErr_ChainExceptions1(PyObject *);
 
 /* In exceptions.c */
 
-PyAPI_FUNC(int) _PyUnicodeError_GetParams(
-    PyObject *self,
-    PyObject **obj, Py_ssize_t *objlen,
-    Py_ssize_t *start, Py_ssize_t *end,
-    int as_bytes);
-
 PyAPI_FUNC(PyObject*) PyUnstable_Exc_PrepReraiseStar(
      PyObject *orig,
      PyObject *excs);
diff --git a/Include/internal/pycore_pyerrors.h 
b/Include/internal/pycore_pyerrors.h
index 6f2fdda9a9f12f..8dea2d34117430 100644
--- a/Include/internal/pycore_pyerrors.h
+++ b/Include/internal/pycore_pyerrors.h
@@ -190,6 +190,15 @@ Py_DEPRECATED(3.12) extern void 
_PyErr_ChainExceptions(PyObject *, PyObject *, P
 PyAPI_DATA(PyTypeObject) _PyExc_IncompleteInputError;
 #define PyExc_IncompleteInputError ((PyObject *)(&_PyExc_IncompleteInputError))
 
+extern int _PyUnicodeError_GetParams(
+    PyObject *self,
+    PyObject **obj,
+    Py_ssize_t *objlen,
+    Py_ssize_t *start,
+    Py_ssize_t *end,
+    int as_bytes);
+
+
 #ifdef __cplusplus
 }
 #endif

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to