gh-115399: Upgrade bundled libexpat to 2.6.0 (#115431) · python/cpython@4b2d178
@@ -11,11 +11,13 @@
1111 Copyright (c) 2000-2005 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
1212 Copyright (c) 2001-2002 Greg Stein <gstein@users.sourceforge.net>
1313 Copyright (c) 2002-2016 Karl Waclawek <karl@waclawek.net>
14- Copyright (c) 2016-2022 Sebastian Pipping <sebastian@pipping.org>
14+ Copyright (c) 2016-2024 Sebastian Pipping <sebastian@pipping.org>
1515 Copyright (c) 2016 Cristian Rodríguez <crrodriguez@opensuse.org>
1616 Copyright (c) 2016 Thomas Beutlich <tc@tbeu.de>
1717 Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
1818 Copyright (c) 2022 Thijs Schreijer <thijs@thijsschreijer.nl>
19+ Copyright (c) 2023 Hanno Böck <hanno@gentoo.org>
20+ Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com>
1921 Licensed under the MIT license:
20222123 Permission is hereby granted, free of charge, to any person obtaining
@@ -269,7 +271,7 @@ XML_ParserCreate_MM(const XML_Char *encoding,
269271const XML_Memory_Handling_Suite *memsuite,
270272const XML_Char *namespaceSeparator);
271273272-/* Prepare a parser object to be re-used. This is particularly
274+/* Prepare a parser object to be reused. This is particularly
273275 valuable when memory allocation overhead is disproportionately high,
274276 such as when a large number of small documnents need to be parsed.
275277 All handlers are cleared from the parser, except for the
@@ -951,7 +953,7 @@ XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser);
951953XMLPARSEAPI(int)
952954XML_GetCurrentByteCount(XML_Parser parser);
953955954-/* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets
956+/* If XML_CONTEXT_BYTES is >=1, returns the input buffer, sets
955957 the integer pointed to by offset to the offset within this buffer
956958 of the current parse position, and sets the integer pointed to by size
957959 to the size of this buffer (the number of input bytes). Otherwise
@@ -1025,7 +1027,9 @@ enum XML_FeatureEnum {
10251027 XML_FEATURE_ATTR_INFO,
10261028/* Added in Expat 2.4.0. */
10271029 XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT,
1028- XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT
1030+ XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT,
1031+/* Added in Expat 2.6.0. */
1032+ XML_FEATURE_GE
10291033/* Additional features must be added to the end of this enum. */
10301034};
10311035@@ -1038,23 +1042,29 @@ typedef struct {
10381042XMLPARSEAPI(const XML_Feature *)
10391043XML_GetFeatureList(void);
104010441041-#ifdef XML_DTD
1042-/* Added in Expat 2.4.0. */
1045+#if XML_GE == 1
1046+/* Added in Expat 2.4.0 for XML_DTD defined and
1047+ * added in Expat 2.6.0 for XML_GE == 1. */
10431048XMLPARSEAPI(XML_Bool)
10441049XML_SetBillionLaughsAttackProtectionMaximumAmplification(
10451050 XML_Parser parser, float maximumAmplificationFactor);
104610511047-/* Added in Expat 2.4.0. */
1052+/* Added in Expat 2.4.0 for XML_DTD defined and
1053+ * added in Expat 2.6.0 for XML_GE == 1. */
10481054XMLPARSEAPI(XML_Bool)
10491055XML_SetBillionLaughsAttackProtectionActivationThreshold(
10501056 XML_Parser parser, unsigned long long activationThresholdBytes);
10511057#endif
105210581059+/* Added in Expat 2.6.0. */
1060+XMLPARSEAPI(XML_Bool)
1061+XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
1062+10531063/* Expat follows the semantic versioning convention.
1054- See http://semver.org.
1064+ See https://semver.org
10551065*/
10561066#define XML_MAJOR_VERSION 2
1057-#define XML_MINOR_VERSION 5
1067+#define XML_MINOR_VERSION 6
10581068#define XML_MICRO_VERSION 0
1059106910601070#ifdef __cplusplus