summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-07-03 10:48:50 (GMT)
committerGitHub <noreply@github.com>2023-07-03 10:48:50 (GMT)
commitc5afc97fc2f149758f597c21f65b4a1c770bb827 (patch)
tree8f85655985da6804d77f352ca7e90f4ecc96bc0c /Objects
parent18fedd04a7b4d54b5eb7a34a1e1c9ca42219f882 (diff)
downloadcpython-c5afc97fc2f149758f597c21f65b4a1c770bb827.zip
cpython-c5afc97fc2f149758f597c21f65b4a1c770bb827.tar.gz
cpython-c5afc97fc2f149758f597c21f65b4a1c770bb827.tar.bz2
gh-106320: Remove private _PyErr C API functions (#106356)
Remove private _PyErr C API functions: move them to the internal C API (pycore_pyerrors.h).
Diffstat (limited to 'Objects')
-rw-r--r--Objects/moduleobject.c5
-rw-r--r--Objects/obmalloc.c4
-rw-r--r--Objects/unicodeobject.c1
3 files changed, 6 insertions, 4 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index d4fccae..3e500b5 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -4,9 +4,10 @@
#include "Python.h"
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_interp.h" // PyInterpreterState.importlib
-#include "pycore_object.h" // _PyType_AllocNoTrack
-#include "pycore_moduleobject.h" // _PyModule_GetDef()
#include "pycore_modsupport.h" // _PyModule_CreateInitialized()
+#include "pycore_moduleobject.h" // _PyModule_GetDef()
+#include "pycore_object.h" // _PyType_AllocNoTrack
+#include "pycore_pyerrors.h" // _PyErr_FormatFromCause()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "structmember.h" // PyMemberDef
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index 9620a8f..eb68d7c 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -2,10 +2,10 @@
#include "Python.h"
#include "pycore_code.h" // stats
-#include "pycore_pystate.h" // _PyInterpreterState_GET
-
#include "pycore_obmalloc.h"
+#include "pycore_pyerrors.h" // _Py_FatalErrorFormat()
#include "pycore_pymem.h"
+#include "pycore_pystate.h" // _PyInterpreterState_GET
#include <stdlib.h> // malloc()
#include <stdbool.h>
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 7940271..12e379d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -50,6 +50,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "pycore_long.h" // _PyLong_FormatWriter()
#include "pycore_object.h" // _PyObject_GC_TRACK(), _Py_FatalRefcountError()
#include "pycore_pathconfig.h" // _Py_DumpPathConfig()
+#include "pycore_pyerrors.h" // _PyUnicodeTranslateError_Create()
#include "pycore_pylifecycle.h" // _Py_SetFileSystemEncoding()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI