summaryrefslogtreecommitdiffstats
path: root/Include/pyexpat.h
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2018-09-18 12:38:58 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-09-18 12:38:58 (GMT)
commitcb5778f00ce48631c7140f33ba242496aaf7102b (patch)
tree9905106a1ee7ce94d9fa93b6ac395634c2f24c2f /Include/pyexpat.h
parent0185f34ddcf07b78feb6ac666fbfd4615d26b028 (diff)
downloadcpython-cb5778f00ce48631c7140f33ba242496aaf7102b.zip
cpython-cb5778f00ce48631c7140f33ba242496aaf7102b.tar.gz
cpython-cb5778f00ce48631c7140f33ba242496aaf7102b.tar.bz2
bpo-34623: Use XML_SetHashSalt in _elementtree (GH-9146)
The C accelerated _elementtree module now initializes hash randomization salt from _Py_HashSecret instead of libexpat's default CPRNG. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue34623
Diffstat (limited to 'Include/pyexpat.h')
-rw-r--r--Include/pyexpat.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/pyexpat.h b/Include/pyexpat.h
index 44259bf..07020b5 100644
--- a/Include/pyexpat.h
+++ b/Include/pyexpat.h
@@ -3,7 +3,7 @@
/* note: you must import expat.h before importing this module! */
-#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0"
+#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1"
#define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
struct PyExpat_CAPI
@@ -48,6 +48,8 @@ struct PyExpat_CAPI
enum XML_Status (*SetEncoding)(XML_Parser parser, const XML_Char *encoding);
int (*DefaultUnknownEncodingHandler)(
void *encodingHandlerData, const XML_Char *name, XML_Encoding *info);
+ /* might be none for expat < 2.1.0 */
+ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
/* always add new stuff to the end! */
};