summaryrefslogtreecommitdiffstats
path: root/Parser/pgenmain.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-03-15 21:22:13 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-03-15 21:22:13 (GMT)
commit0611c26a58a937dace420691e797fbea21db619b (patch)
tree20f6c60f778a2e999d299b3b015f01d83a10eb4d /Parser/pgenmain.c
parentaf584a02a5dee4250e904ff75d22359aee9c2d70 (diff)
downloadcpython-0611c26a58a937dace420691e797fbea21db619b.zip
cpython-0611c26a58a937dace420691e797fbea21db619b.tar.gz
cpython-0611c26a58a937dace420691e797fbea21db619b.tar.bz2
On memory error, dump the memory block traceback
Issue #26564: _PyObject_DebugDumpAddress() now dumps the traceback where a memory block was allocated on memory block. Use the tracemalloc module to get the traceback.
Diffstat (limited to 'Parser/pgenmain.c')
-rw-r--r--Parser/pgenmain.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index 671a0cb..d5a13fe 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -38,11 +38,11 @@ Py_Exit(int sts)
}
#ifdef WITH_THREAD
-/* Needed by obmalloc.c */
+/* Functions needed by obmalloc.c */
int PyGILState_Check(void)
-{
- return 1;
-}
+{ return 1; }
+void _PyMem_DumpTraceback(int fd, const void *ptr)
+{}
#endif
int