summaryrefslogtreecommitdiffstats
path: root/Include/moduleobject.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-01-18 19:47:13 (GMT)
committerGitHub <noreply@github.com>2021-01-18 19:47:13 (GMT)
commit250035d134ad482e724f73ce654682254b513ee0 (patch)
tree48d2b3627adfe0b0e04aaaee25f35f4999cde254 /Include/moduleobject.h
parentf7b5bacd7a0b2084ce699eda6f6f4b1adfa16590 (diff)
downloadcpython-250035d134ad482e724f73ce654682254b513ee0.zip
cpython-250035d134ad482e724f73ce654682254b513ee0.tar.gz
cpython-250035d134ad482e724f73ce654682254b513ee0.tar.bz2
bpo-42923: Dump extension modules on fatal error (GH-24207)
The Py_FatalError() function and the faulthandler module now dump the list of extension modules on a fatal error. Add _Py_DumpExtensionModules() and _PyModule_IsExtension() internal functions.
Diffstat (limited to 'Include/moduleobject.h')
-rw-r--r--Include/moduleobject.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/moduleobject.h b/Include/moduleobject.h
index cf9ad40..49b116c 100644
--- a/Include/moduleobject.h
+++ b/Include/moduleobject.h
@@ -84,6 +84,12 @@ typedef struct PyModuleDef{
freefunc m_free;
} PyModuleDef;
+
+// Internal C API
+#ifdef Py_BUILD_CORE
+extern int _PyModule_IsExtension(PyObject *obj);
+#endif
+
#ifdef __cplusplus
}
#endif