From 250035d134ad482e724f73ce654682254b513ee0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 18 Jan 2021 20:47:13 +0100 Subject: 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. --- Include/moduleobject.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Include/moduleobject.h') diff --git a/Include/moduleobject.h b/Include/moduleobject.h index cf9ad40c0a..49b116ca1c 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 -- cgit v1.2.1