summaryrefslogtreecommitdiff
path: root/Include/pydebug.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-07-09 02:57:01 +0000
committerTim Peters <tim.peters@gmail.com>2002-07-09 02:57:01 +0000
commit6a1393e6c5f1ab4b2089061559766bfb5709ae62 (patch)
tree23e4e71e539a4f50c729a646bca1d6f4a1d77ef4 /Include/pydebug.h
parent298402b2ba4702e1bcc1ff92cc2539c404ae78ba (diff)
downloadcpython-6a1393e6c5f1ab4b2089061559766bfb5709ae62.tar.gz
The Py_REF_DEBUG/COUNT_ALLOCS/Py_TRACE_REFS macro minefield: added
more trivial lexical helper macros so that uses of these guys expand to nothing at all when they're not enabled. This should help sub- standard compilers that can't do a good job of optimizing away the previous "(void)0" expressions. Py_DECREF: There's only one definition of this now. Yay! That was that last one in the family defined multiple times in an #ifdef maze. Py_FatalError(): Changed the char* signature to const char*. _Py_NegativeRefcount(): New helper function for the Py_REF_DEBUG expansion of Py_DECREF. Calling an external function cuts down on the volume of generated code. The previous inline expansion of abort() didn't work as intended on Windows (the program often kept going, and the error msg scrolled off the screen unseen). _Py_NegativeRefcount calls Py_FatalError instead, which captures our best knowledge of how to abort effectively across platforms.
Diffstat (limited to 'Include/pydebug.h')
-rw-r--r--Include/pydebug.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/pydebug.h b/Include/pydebug.h
index d92161cd64..e24c9fe005 100644
--- a/Include/pydebug.h
+++ b/Include/pydebug.h
@@ -26,7 +26,7 @@ extern DL_IMPORT(int) _Py_QnewFlag;
PYTHONPATH and PYTHONHOME from the environment */
#define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s))
-DL_IMPORT(void) Py_FatalError(char *message);
+DL_IMPORT(void) Py_FatalError(const char *message);
#ifdef __cplusplus
}