diff Python/sysmodule.c @ 31796:1c117dbb2def legacy-trunk

Enable the profiling of C functions (builtins and extensions)
author Nicholas Bastin <nick.bastin@gmail.com>
date Wed, 24 Mar 2004 21:57:10 +0000
parents a88e6dfbfd6d
children 846b3ee7e106
line wrap: on
line diff
--- a/Python/sysmodule.c	Wed Mar 24 16:48:24 2004 +0000
+++ b/Python/sysmodule.c	Wed Mar 24 21:57:10 2004 +0000
@@ -272,15 +272,16 @@
  * Cached interned string objects used for calling the profile and
  * trace functions.  Initialized by trace_init().
  */
-static PyObject *whatstrings[4] = {NULL, NULL, NULL, NULL};
+static PyObject *whatstrings[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL};
 
 static int
 trace_init(void)
 {
-	static char *whatnames[4] = {"call", "exception", "line", "return"};
+	static char *whatnames[7] = {"call", "exception", "line", "return",
+					"c_call", "c_exception", "c_return"};
 	PyObject *name;
 	int i;
-	for (i = 0; i < 4; ++i) {
+	for (i = 0; i < 7; ++i) {
 		if (whatstrings[i] == NULL) {
 			name = PyString_InternFromString(whatnames[i]);
 			if (name == NULL)