summaryrefslogtreecommitdiff
path: root/Include/pydebug.h
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-02-20 21:31:46 +0100
committerGeorg Brandl <georg@python.org>2012-02-20 21:31:46 +0100
commitc046a714e1f2152c7f45bc90d6f3829c34e7029f (patch)
tree4ad97aaf7ffcf9e49750a59179ef736b8e62e6e1 /Include/pydebug.h
parent5af1ccb2a86c32b4a7ed302bd75dd824606fc222 (diff)
parent9edd5e108cf2736595d6bb117e1a2a45b4403e85 (diff)
downloadcpython-c046a714e1f2152c7f45bc90d6f3829c34e7029f.tar.gz
Merge from 3.1: Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
Diffstat (limited to 'Include/pydebug.h')
-rw-r--r--Include/pydebug.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/pydebug.h b/Include/pydebug.h
index 5969e44419..e23cbdc3ad 100644
--- a/Include/pydebug.h
+++ b/Include/pydebug.h
@@ -1,4 +1,4 @@
-
+#ifndef Py_LIMITED_API
#ifndef Py_PYDEBUG_H
#define Py_PYDEBUG_H
#ifdef __cplusplus
@@ -7,6 +7,7 @@ extern "C" {
PyAPI_DATA(int) Py_DebugFlag;
PyAPI_DATA(int) Py_VerboseFlag;
+PyAPI_DATA(int) Py_QuietFlag;
PyAPI_DATA(int) Py_InteractiveFlag;
PyAPI_DATA(int) Py_InspectFlag;
PyAPI_DATA(int) Py_OptimizeFlag;
@@ -32,3 +33,4 @@ PyAPI_FUNC(void) Py_FatalError(const char *message);
}
#endif
#endif /* !Py_PYDEBUG_H */
+#endif /* Py_LIMITED_API */