Skip to content

Commit c0de650

Browse files
authored
pythongh-131809: Upgrade vendored expat to 2.7.1 (python#132192)
1 parent f0dcb29 commit c0de650

File tree

6 files changed

+26
-16
lines changed

6 files changed

+26
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update bundled libexpat to 2.7.1

Diff for: Misc/sbom.spdx.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Modules/expat/expat.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
10681068
*/
10691069
#define XML_MAJOR_VERSION 2
10701070
#define XML_MINOR_VERSION 7
1071-
#define XML_MICRO_VERSION 0
1071+
#define XML_MICRO_VERSION 1
10721072

10731073
#ifdef __cplusplus
10741074
}

Diff for: Modules/expat/internal.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
Copyright (c) 2002-2003 Fred L. Drake, Jr. <[email protected]>
2929
Copyright (c) 2002-2006 Karl Waclawek <[email protected]>
3030
Copyright (c) 2003 Greg Stein <[email protected]>
31-
Copyright (c) 2016-2024 Sebastian Pipping <[email protected]>
31+
Copyright (c) 2016-2025 Sebastian Pipping <[email protected]>
3232
Copyright (c) 2018 Yury Gribov <[email protected]>
3333
Copyright (c) 2019 David Loffredo <[email protected]>
3434
Copyright (c) 2023-2024 Sony Corporation / Snild Dolkow <[email protected]>
@@ -127,6 +127,9 @@
127127
# elif ULONG_MAX == 18446744073709551615u // 2^64-1
128128
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "ld"
129129
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "lu"
130+
# elif defined(EMSCRIPTEN) // 32bit mode Emscripten
131+
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "ld"
132+
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "zu"
130133
# else
131134
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "d"
132135
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "u"

Diff for: Modules/expat/refresh.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ fi
1212

1313
# Update this when updating to a new version after verifying that the changes
1414
# the update brings in are good. These values are used for verifying the SBOM, too.
15-
expected_libexpat_tag="R_2_7_0"
16-
expected_libexpat_version="2.7.0"
17-
expected_libexpat_sha256="362e89ca6b8a0d46fc5740a917eb2a8b4d6356edbe016eee09f49c0781215844"
15+
expected_libexpat_tag="R_2_7_1"
16+
expected_libexpat_version="2.7.1"
17+
expected_libexpat_sha256="0cce2e6e69b327fc607b8ff264f4b66bdf71ead55a87ffd5f3143f535f15cfa2"
1818

1919
expat_dir="$(realpath "$(dirname -- "${BASH_SOURCE[0]}")")"
2020
cd ${expat_dir}

Diff for: Modules/expat/xmlparse.c

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* 7d6840a33c250b74adb0ba295d6ec818dccebebaffc8c3ed27d0b29c28adbeb3 (2.7.0+)
1+
/* d19ae032c224863c1527ba44d228cc34b99192c3a4c5a27af1f4e054d45ee031 (2.7.1+)
22
__ __ _
33
___\ \/ /_ __ __ _| |_
44
/ _ \\ /| '_ \ / _` | __|
@@ -3402,12 +3402,13 @@ doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
34023402
break;
34033403
/* LCOV_EXCL_STOP */
34043404
}
3405-
*eventPP = s = next;
34063405
switch (parser->m_parsingStatus.parsing) {
34073406
case XML_SUSPENDED:
3407+
*eventPP = next;
34083408
*nextPtr = next;
34093409
return XML_ERROR_NONE;
34103410
case XML_FINISHED:
3411+
*eventPP = next;
34113412
return XML_ERROR_ABORTED;
34123413
case XML_PARSING:
34133414
if (parser->m_reenter) {
@@ -3416,6 +3417,7 @@ doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc,
34163417
}
34173418
/* Fall through */
34183419
default:;
3420+
*eventPP = s = next;
34193421
}
34203422
}
34213423
/* not reached */
@@ -4332,19 +4334,21 @@ doCdataSection(XML_Parser parser, const ENCODING *enc, const char **startPtr,
43324334
/* LCOV_EXCL_STOP */
43334335
}
43344336

4335-
*eventPP = s = next;
43364337
switch (parser->m_parsingStatus.parsing) {
43374338
case XML_SUSPENDED:
4339+
*eventPP = next;
43384340
*nextPtr = next;
43394341
return XML_ERROR_NONE;
43404342
case XML_FINISHED:
4343+
*eventPP = next;
43414344
return XML_ERROR_ABORTED;
43424345
case XML_PARSING:
43434346
if (parser->m_reenter) {
43444347
return XML_ERROR_UNEXPECTED_STATE; // LCOV_EXCL_LINE
43454348
}
43464349
/* Fall through */
43474350
default:;
4351+
*eventPP = s = next;
43484352
}
43494353
}
43504354
/* not reached */
@@ -5951,19 +5955,21 @@ epilogProcessor(XML_Parser parser, const char *s, const char *end,
59515955
default:
59525956
return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
59535957
}
5954-
parser->m_eventPtr = s = next;
59555958
switch (parser->m_parsingStatus.parsing) {
59565959
case XML_SUSPENDED:
5960+
parser->m_eventPtr = next;
59575961
*nextPtr = next;
59585962
return XML_ERROR_NONE;
59595963
case XML_FINISHED:
5964+
parser->m_eventPtr = next;
59605965
return XML_ERROR_ABORTED;
59615966
case XML_PARSING:
59625967
if (parser->m_reenter) {
59635968
return XML_ERROR_UNEXPECTED_STATE; // LCOV_EXCL_LINE
59645969
}
59655970
/* Fall through */
59665971
default:;
5972+
parser->m_eventPtr = s = next;
59675973
}
59685974
}
59695975
}
@@ -8245,7 +8251,7 @@ entityTrackingReportStats(XML_Parser rootParser, ENTITY *entity,
82458251
(void *)rootParser, rootParser->m_entity_stats.countEverOpened,
82468252
rootParser->m_entity_stats.currentDepth,
82478253
rootParser->m_entity_stats.maximumDepthSeen,
8248-
(rootParser->m_entity_stats.currentDepth - 1) * 2, "",
8254+
((int)rootParser->m_entity_stats.currentDepth - 1) * 2, "",
82498255
entity->is_param ? "%" : "&", entityName, action, entity->textLen,
82508256
sourceLine);
82518257
}

0 commit comments

Comments
 (0)