mirror of https://github.com/python/cpython
Simple embedded program that does a module import. Useful for
debugging leaks and other memory problems.
This commit is contained in:
parent
2df3c41e78
commit
f9abaf42f8
|
@ -0,0 +1,17 @@
|
||||||
|
#include <Python.h>
|
||||||
|
|
||||||
|
char* cmd = "import exceptions";
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
Py_Initialize();
|
||||||
|
PyEval_InitThreads();
|
||||||
|
PyRun_SimpleString(cmd);
|
||||||
|
Py_EndInterpreter(PyThreadState_Get());
|
||||||
|
|
||||||
|
Py_NewInterpreter();
|
||||||
|
PyRun_SimpleString(cmd);
|
||||||
|
Py_Finalize();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue