File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ struct PyExpat_CAPI
5252 int (* SetHashSalt )(XML_Parser parser , unsigned long hash_salt );
5353 /* might be NULL for expat < 2.6.0 */
5454 XML_Bool (* SetReparseDeferralEnabled )(XML_Parser parser , XML_Bool enabled );
55+ /* might be NULL for expat < 2.7.2 */
56+ XML_Bool (* SetAllocTrackerActivationThreshold )(
57+ XML_Parser parser , unsigned long long activationThresholdBytes );
58+ XML_Bool (* SetAllocTrackerMaximumAmplification )(
59+ XML_Parser parser , float maxAmplificationFactor );
5560 /* always add new stuff to the end! */
5661};
5762
Original file line number Diff line number Diff line change @@ -2285,6 +2285,13 @@ pyexpat_exec(PyObject *mod)
22852285#else
22862286 capi -> SetReparseDeferralEnabled = NULL ;
22872287#endif
2288+ #if XML_COMBINED_VERSION >= 20702
2289+ capi -> SetAllocTrackerActivationThreshold = XML_SetAllocTrackerActivationThreshold ;
2290+ capi -> SetAllocTrackerMaximumAmplification = XML_SetAllocTrackerMaximumAmplification ;
2291+ #else
2292+ capi -> SetAllocTrackerActivationThreshold = NULL ;
2293+ capi -> SetAllocTrackerMaximumAmplification = NULL ;
2294+ #endif
22882295
22892296 /* export using capsule */
22902297 PyObject * capi_object = PyCapsule_New (capi , PyExpat_CAPSULE_NAME ,
You can’t perform that action at this time.
0 commit comments