summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-24 23:35:47 (GMT)
committerGitHub <noreply@github.com>2023-08-24 23:35:47 (GMT)
commit546cab84448b892c92e68d9c1a3d3b58c13b3463 (patch)
treec376b5fd170cbd7ad902e47f6f59a107467b029c /Include
parentd6ac5c7b105fe57266bd71248e3ada41fedb5ba9 (diff)
downloadcpython-546cab84448b892c92e68d9c1a3d3b58c13b3463.zip
cpython-546cab84448b892c92e68d9c1a3d3b58c13b3463.tar.gz
cpython-546cab84448b892c92e68d9c1a3d3b58c13b3463.tar.bz2
gh-106320: Remove private _PyTraceback functions (#108453)
Move private functions to the internal C API (pycore_traceback.h): * _Py_DisplaySourceLine() * _PyTraceback_Add()
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/traceback.h3
-rw-r--r--Include/internal/pycore_traceback.h6
2 files changed, 6 insertions, 3 deletions
diff --git a/Include/cpython/traceback.h b/Include/cpython/traceback.h
index a4e087b..81c5194 100644
--- a/Include/cpython/traceback.h
+++ b/Include/cpython/traceback.h
@@ -11,6 +11,3 @@ struct _traceback {
int tb_lasti;
int tb_lineno;
};
-
-PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int, int *, PyObject **);
-PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
diff --git a/Include/internal/pycore_traceback.h b/Include/internal/pycore_traceback.h
index 21fb4a2..01b3f5b 100644
--- a/Include/internal/pycore_traceback.h
+++ b/Include/internal/pycore_traceback.h
@@ -8,6 +8,12 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif
+// Export for '_ctypes' shared extension
+PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int, int *, PyObject **);
+
+// Export for 'pyexact' shared extension
+PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
+
/* Write the Python traceback into the file 'fd'. For example:
Traceback (most recent call first):