summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-01-24 04:07:45 +0000
committerGuido van Rossum <guido@python.org>1997-01-24 04:07:45 +0000
commit82109b12ec34d9bb88351b4d11a914627ad14c9c (patch)
tree43a94a2f87ffafe46553c3a3358fe2e4f4de7498 /Python/sysmodule.c
parentc9f5f0ade1a1e45939c6d6124247aea870e01bc6 (diff)
downloadcpython-82109b12ec34d9bb88351b4d11a914627ad14c9c.tar.gz
Added optional interface for dynamic execution profile (to be gathered
in ceval.c).
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 568f45aed6..c1eaeede5e 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -194,21 +194,30 @@ sys_getcounts(self, args)
extern PyObject *_Py_GetObjects Py_PROTO((PyObject *, PyObject *));
#endif
+#ifdef DYNAMIC_EXECUTION_PROFILE
+/* Defined in ceval.c because it uses static globals if that file */
+extern PyObject *_Py_GetDXProfile Py_PROTO((PyObject *, PyObject *));
+#endif
+
static struct methodlist sys_methods[] = {
+ /* Might as well keep this in alphabetic order */
{"exit", sys_exit, 0},
- {"getrefcount", sys_getrefcount, 0},
#ifdef COUNT_ALLOCS
{"getcounts", sys_getcounts, 0},
#endif
+#ifdef DYNAMIC_EXECUTION_PROFILE
+ {"getdxp", _Py_GetDXProfile, 1},
+#endif
#ifdef Py_TRACE_REFS
{"getobjects", _Py_GetObjects, 1},
#endif
+ {"getrefcount", sys_getrefcount, 0},
#ifdef USE_MALLOPT
{"mdebug", sys_mdebug, 0},
#endif
+ {"setcheckinterval", sys_setcheckinterval, 1},
{"setprofile", sys_setprofile, 0},
{"settrace", sys_settrace, 0},
- {"setcheckinterval", sys_setcheckinterval, 1},
{NULL, NULL} /* sentinel */
};