mirror of
https://github.com/python/cpython.git
synced 2026-10-28 10:25:05 +08:00
[3.13] gh-152216: Update bundled expat to 2.8.2 (GH-152234) (#154747)
(cherry picked from commit c22e9c9dae)
This commit is contained in:
1 parent
12f07c432a
commit
31b4886e8f
16 files changed
+927
-589
No files matched your search
@@ -626,13 +626,16 @@ LIBEXPAT_HEADERS= \
|
||||
Modules/expat/expat.h \
|
||||
Modules/expat/expat_config.h \
|
||||
Modules/expat/expat_external.h \
|
||||
Modules/expat/fallthrough.h \
|
||||
Modules/expat/iasciitab.h \
|
||||
Modules/expat/internal.h \
|
||||
Modules/expat/latin1tab.h \
|
||||
Modules/expat/memory_sanitizer.h \
|
||||
Modules/expat/nametab.h \
|
||||
Modules/expat/pyexpatns.h \
|
||||
Modules/expat/siphash.h \
|
||||
Modules/expat/utf8tab.h \
|
||||
Modules/expat/xcsinc.c \
|
||||
Modules/expat/xmlrole.h \
|
||||
Modules/expat/xmltok.h \
|
||||
Modules/expat/xmltok_impl.h \
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Update bundled `libexpat <https://libexpat.github.io/>`_ to version 2.8.2.
|
||||
Generated
+71
-14
@@ -48,11 +48,11 @@
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "58101ef0951568acadd3117033bef084fea24cc1"
|
||||
"checksumValue": "00c5e72b384f5c305be613729184ad37bb491238"
|
||||
},
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"checksumValue": "52d756026bf09befdb211c453e2009a646d6c6b519e6885e971b2550396619fb"
|
||||
"checksumValue": "eb43180fbdca40e36d9558060e6e654ef4c451ca656ad679e9e1269eb45456b3"
|
||||
}
|
||||
],
|
||||
"fileName": "Modules/expat/expat.h"
|
||||
@@ -71,6 +71,20 @@
|
||||
],
|
||||
"fileName": "Modules/expat/expat_external.h"
|
||||
},
|
||||
{
|
||||
"SPDXID": "SPDXRef-FILE-Modules-expat-fallthrough.h",
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "69db5031480c50a1e35a51190bd64fcb816b6caf"
|
||||
},
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"checksumValue": "3dac2e4fdec819ede1b081ef776f2421c98ab509f69d5647a21d63d651179df2"
|
||||
}
|
||||
],
|
||||
"fileName": "Modules/expat/fallthrough.h"
|
||||
},
|
||||
{
|
||||
"SPDXID": "SPDXRef-FILE-Modules-expat-iasciitab.h",
|
||||
"checksums": [
|
||||
@@ -113,6 +127,20 @@
|
||||
],
|
||||
"fileName": "Modules/expat/latin1tab.h"
|
||||
},
|
||||
{
|
||||
"SPDXID": "SPDXRef-FILE-Modules-expat-memory-sanitizer.h",
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "abdf1b9e9642176466ecbb77d5f48e502d01d0d8"
|
||||
},
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"checksumValue": "10c66f1cf9dc28608d57cb19adc8c7c654800e8b5b1b9be176eaed802deca2d9"
|
||||
}
|
||||
],
|
||||
"fileName": "Modules/expat/memory_sanitizer.h"
|
||||
},
|
||||
{
|
||||
"SPDXID": "SPDXRef-FILE-Modules-expat-nametab.h",
|
||||
"checksums": [
|
||||
@@ -132,11 +160,11 @@
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "aca27f46d9fd387b63ce7ff2e4f172cad130b39b"
|
||||
"checksumValue": "6648f9c12a8d6f77a6eab5ef5c7caa976e7549aa"
|
||||
},
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"checksumValue": "f537add526ecda8389503b7ef45fb52b6217e4dc171dcc3a8dc6903ff6134726"
|
||||
"checksumValue": "c1be28dd62282e668d4daedfe756edb68b7da165c442202bb06a9e597cd5c289"
|
||||
}
|
||||
],
|
||||
"fileName": "Modules/expat/siphash.h"
|
||||
@@ -169,16 +197,30 @@
|
||||
],
|
||||
"fileName": "Modules/expat/winconfig.h"
|
||||
},
|
||||
{
|
||||
"SPDXID": "SPDXRef-FILE-Modules-expat-xcsinc.c",
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "69fa7a25f555164f089fdcf290f3af6a1731621f"
|
||||
},
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"checksumValue": "071345c5ccfbe2e46a02839331ee60ee20048348b4408964bff48c4355473b9e"
|
||||
}
|
||||
],
|
||||
"fileName": "Modules/expat/xcsinc.c"
|
||||
},
|
||||
{
|
||||
"SPDXID": "SPDXRef-FILE-Modules-expat-xmlparse.c",
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "1dad2ab196cdbe37572674c465bd9187fdbe4495"
|
||||
"checksumValue": "a5a5dd44ee8eeb73f42fa42ca1499cd282ddf6a6"
|
||||
},
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"checksumValue": "740137e670d2f3b7269364ffb6f60064e6560091850c5d6f2c3bb1b8ca6e3dd1"
|
||||
"checksumValue": "5d2c99b576744edd9545cefe613e0577617f57e16c86387edc13d45710dc97d2"
|
||||
}
|
||||
],
|
||||
"fileName": "Modules/expat/xmlparse.c"
|
||||
@@ -216,11 +258,11 @@
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "63e4766a09e63760c6518670509198f8d638f4ad"
|
||||
"checksumValue": "08dba893b34338e64b66f1044f542aa6760dbab1"
|
||||
},
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"checksumValue": "0ad3f915f2748dc91bf4e4b4a50cf40bf2c95769d0eca7e3b293a230d82bb779"
|
||||
"checksumValue": "0c842b1876503e699517994317805dd2298d9e11c94dcc87c2ecb6c2b8e00bc0"
|
||||
}
|
||||
],
|
||||
"fileName": "Modules/expat/xmltok.c"
|
||||
@@ -244,11 +286,11 @@
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA1",
|
||||
"checksumValue": "7756f7c0d3625ae7dde6cf7d386685ffacb57c7e"
|
||||
"checksumValue": "3ccb9335589c3ff60aae50ac79b2cdac57999bee"
|
||||
},
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"checksumValue": "a3fe18ff32b21fbcb7c190895c68158404e1b9fb449db6431bc08b261dc03938"
|
||||
"checksumValue": "94eeaef9ed46d10f80f748924fbf41f950b4859d6f234f61fdb2c8f1a8e77bd1"
|
||||
}
|
||||
],
|
||||
"fileName": "Modules/expat/xmltok_impl.c"
|
||||
@@ -1548,14 +1590,14 @@
|
||||
"checksums": [
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"checksumValue": "a52eb72108be160e190b5cafa5bba8663f1313f2013e26060d1c18e26e31067b"
|
||||
"checksumValue": "ef7d1994f533c9e7343d6c19f31064fc8ebbcbcaa144be3812b4f43052a05f4c"
|
||||
}
|
||||
],
|
||||
"downloadLocation": "https://github.com/libexpat/libexpat/releases/download/R_2_8_1/expat-2.8.1.tar.gz",
|
||||
"downloadLocation": "https://github.com/libexpat/libexpat/releases/download/R_2_8_2/expat-2.8.2.tar.gz",
|
||||
"externalRefs": [
|
||||
{
|
||||
"referenceCategory": "SECURITY",
|
||||
"referenceLocator": "cpe:2.3:a:libexpat_project:libexpat:2.8.1:*:*:*:*:*:*:*",
|
||||
"referenceLocator": "cpe:2.3:a:libexpat_project:libexpat:2.8.2:*:*:*:*:*:*:*",
|
||||
"referenceType": "cpe23Type"
|
||||
}
|
||||
],
|
||||
@@ -1563,7 +1605,7 @@
|
||||
"name": "expat",
|
||||
"originator": "Organization: Expat development team",
|
||||
"primaryPackagePurpose": "SOURCE",
|
||||
"versionInfo": "2.8.1"
|
||||
"versionInfo": "2.8.2"
|
||||
},
|
||||
{
|
||||
"SPDXID": "SPDXRef-PACKAGE-hacl-star",
|
||||
@@ -1680,6 +1722,11 @@
|
||||
"relationshipType": "CONTAINS",
|
||||
"spdxElementId": "SPDXRef-PACKAGE-expat"
|
||||
},
|
||||
{
|
||||
"relatedSpdxElement": "SPDXRef-FILE-Modules-expat-fallthrough.h",
|
||||
"relationshipType": "CONTAINS",
|
||||
"spdxElementId": "SPDXRef-PACKAGE-expat"
|
||||
},
|
||||
{
|
||||
"relatedSpdxElement": "SPDXRef-FILE-Modules-expat-iasciitab.h",
|
||||
"relationshipType": "CONTAINS",
|
||||
@@ -1695,6 +1742,11 @@
|
||||
"relationshipType": "CONTAINS",
|
||||
"spdxElementId": "SPDXRef-PACKAGE-expat"
|
||||
},
|
||||
{
|
||||
"relatedSpdxElement": "SPDXRef-FILE-Modules-expat-memory-sanitizer.h",
|
||||
"relationshipType": "CONTAINS",
|
||||
"spdxElementId": "SPDXRef-PACKAGE-expat"
|
||||
},
|
||||
{
|
||||
"relatedSpdxElement": "SPDXRef-FILE-Modules-expat-nametab.h",
|
||||
"relationshipType": "CONTAINS",
|
||||
@@ -1715,6 +1767,11 @@
|
||||
"relationshipType": "CONTAINS",
|
||||
"spdxElementId": "SPDXRef-PACKAGE-expat"
|
||||
},
|
||||
{
|
||||
"relatedSpdxElement": "SPDXRef-FILE-Modules-expat-xcsinc.c",
|
||||
"relationshipType": "CONTAINS",
|
||||
"spdxElementId": "SPDXRef-PACKAGE-expat"
|
||||
},
|
||||
{
|
||||
"relatedSpdxElement": "SPDXRef-FILE-Modules-expat-xmlparse.c",
|
||||
"relationshipType": "CONTAINS",
|
||||
|
||||
@@ -1094,7 +1094,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
|
||||
*/
|
||||
# define XML_MAJOR_VERSION 2
|
||||
# define XML_MINOR_VERSION 8
|
||||
# define XML_MICRO_VERSION 1
|
||||
# define XML_MICRO_VERSION 2
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 2026 Nick Begg <nick@stunttruck.net>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef FALLTHROUGH_H
|
||||
# define FALLTHROUGH_H 1
|
||||
|
||||
// Explicit fallthrough in switch case to avoid warnings
|
||||
// with compiler flag -Wimplicit-fallthrough.
|
||||
|
||||
# define EXPAT_FALLTHROUGH \
|
||||
do { \
|
||||
} while (0)
|
||||
|
||||
# if defined(__has_attribute)
|
||||
# if __has_attribute(fallthrough)
|
||||
# undef EXPAT_FALLTHROUGH
|
||||
# define EXPAT_FALLTHROUGH __attribute__((fallthrough))
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif // FALLTHROUGH_H
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 2026 Matthew Fernandez <matthew.fernandez@gmail.com>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#if ! defined(MEMORY_SANITIZER_H)
|
||||
# define MEMORY_SANITIZER_H 1
|
||||
|
||||
# if defined(__has_feature)
|
||||
# if __has_feature(memory_sanitizer)
|
||||
# include <sanitizer/msan_interface.h>
|
||||
|
||||
// inform Memory Sanitizer that [base, base + extent) is now initialized
|
||||
# define MSAN_UNPOISON(base, extent) __msan_unpoison((base), (extent))
|
||||
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if ! defined(MSAN_UNPOISON)
|
||||
# define MSAN_UNPOISON(base, extent) \
|
||||
do { \
|
||||
} while (0)
|
||||
# endif
|
||||
|
||||
#endif // ! defined(MEMORY_SANITIZER_H)
|
||||
@@ -12,9 +12,9 @@ fi
|
||||
|
||||
# Update this when updating to a new version after verifying that the changes
|
||||
# the update brings in are good. These values are used for verifying the SBOM, too.
|
||||
expected_libexpat_tag="R_2_8_1"
|
||||
expected_libexpat_version="2.8.1"
|
||||
expected_libexpat_sha256="a52eb72108be160e190b5cafa5bba8663f1313f2013e26060d1c18e26e31067b"
|
||||
expected_libexpat_tag="R_2_8_2"
|
||||
expected_libexpat_version="2.8.2"
|
||||
expected_libexpat_sha256="ef7d1994f533c9e7343d6c19f31064fc8ebbcbcaa144be3812b4f43052a05f4c"
|
||||
|
||||
expat_dir="$(realpath "$(dirname -- "${BASH_SOURCE[0]}")")"
|
||||
cd ${expat_dir}
|
||||
@@ -33,13 +33,16 @@ lib_files=(
|
||||
asciitab.h
|
||||
expat.h
|
||||
expat_external.h
|
||||
fallthrough.h
|
||||
iasciitab.h
|
||||
internal.h
|
||||
latin1tab.h
|
||||
memory_sanitizer.h
|
||||
nametab.h
|
||||
siphash.h
|
||||
utf8tab.h
|
||||
winconfig.h
|
||||
xcsinc.c
|
||||
xmlparse.c
|
||||
xmlrole.c
|
||||
xmlrole.h
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
|
||||
#include <stddef.h> /* size_t */
|
||||
#include <stdint.h> /* uint64_t uint32_t uint8_t */
|
||||
#include "fallthrough.h"
|
||||
|
||||
/*
|
||||
* Workaround to not require a C++11 compiler for using ULL suffix
|
||||
@@ -234,25 +235,25 @@ sip24_final(struct siphash *H) {
|
||||
switch (left) {
|
||||
case 7:
|
||||
b |= (uint64_t)H->buf[6] << 48;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case 6:
|
||||
b |= (uint64_t)H->buf[5] << 40;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case 5:
|
||||
b |= (uint64_t)H->buf[4] << 32;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case 4:
|
||||
b |= (uint64_t)H->buf[3] << 24;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case 3:
|
||||
b |= (uint64_t)H->buf[2] << 16;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case 2:
|
||||
b |= (uint64_t)H->buf[1] << 8;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case 1:
|
||||
b |= (uint64_t)H->buf[0] << 0;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case 0:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/* This file is included from other .c files!
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
| __// \| |_) | (_| | |_
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 2022 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
static size_t
|
||||
xcslen(const XML_Char *s) {
|
||||
#ifdef XML_UNICODE
|
||||
# ifdef XML_UNICODE_WCHAR_T
|
||||
return wcslen(s);
|
||||
# else
|
||||
// XML_Char is unsigned short
|
||||
size_t len = 0;
|
||||
while (s[len]) {
|
||||
len++;
|
||||
}
|
||||
return len;
|
||||
# endif
|
||||
#else
|
||||
return strlen(s);
|
||||
#endif
|
||||
}
|
||||
+660
-550
File diff suppressed because it is too large.
Load diff
@@ -25,6 +25,7 @@
|
||||
Copyright (c) 2022 Sean McBride <sean@rogue-research.com>
|
||||
Copyright (c) 2023 Hanno Böck <hanno@gentoo.org>
|
||||
Copyright (c) 2025 Alfonso Gregory <gfunni234@gmail.com>
|
||||
Copyright (c) 2026 Nick Begg <nick@stunttruck.net>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@@ -58,6 +59,7 @@
|
||||
#endif
|
||||
|
||||
#include "internal.h"
|
||||
#include "fallthrough.h"
|
||||
#include "xmltok.h"
|
||||
#include "nametab.h"
|
||||
|
||||
@@ -641,7 +643,7 @@ unicode_byte_type(char hi, char lo) {
|
||||
*(*toP)++ = lo; \
|
||||
break; \
|
||||
} \
|
||||
/* fall through */ \
|
||||
EXPAT_FALLTHROUGH; \
|
||||
case 0x1: \
|
||||
case 0x2: \
|
||||
case 0x3: \
|
||||
@@ -1557,7 +1559,7 @@ initScan(const ENCODING *const *encodingTable, const INIT_ENCODING *enc,
|
||||
case 0xEF: /* possibly first byte of UTF-8 BOM */
|
||||
if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
|
||||
break;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case 0x00:
|
||||
case 0x3C:
|
||||
return XML_TOK_PARTIAL;
|
||||
|
||||
+11
-10
@@ -17,6 +17,7 @@
|
||||
Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
|
||||
Copyright (c) 2020 Boris Kolpackov <boris@codesynthesis.com>
|
||||
Copyright (c) 2022 Martin Ettl <ettl.martin78@googlemail.com>
|
||||
Copyright (c) 2026 Nick Begg <nick@stunttruck.net>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@@ -83,7 +84,7 @@
|
||||
*nextTokPtr = ptr; \
|
||||
return XML_TOK_INVALID; \
|
||||
} \
|
||||
/* fall through */ \
|
||||
EXPAT_FALLTHROUGH; \
|
||||
case BT_NMSTRT: \
|
||||
case BT_HEX: \
|
||||
case BT_DIGIT: \
|
||||
@@ -112,7 +113,7 @@
|
||||
*nextTokPtr = ptr; \
|
||||
return XML_TOK_INVALID; \
|
||||
} \
|
||||
/* fall through */ \
|
||||
EXPAT_FALLTHROUGH; \
|
||||
case BT_NMSTRT: \
|
||||
case BT_HEX: \
|
||||
ptr += MINBPC(enc); \
|
||||
@@ -209,7 +210,7 @@ PREFIX(scanDecl)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case BT_S:
|
||||
case BT_CR:
|
||||
case BT_LF:
|
||||
@@ -323,7 +324,7 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
*nextTokPtr = ptr + MINBPC(enc);
|
||||
return tok;
|
||||
}
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
default:
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
@@ -615,7 +616,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
}
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case BT_EQUALS: {
|
||||
int open;
|
||||
# ifdef XML_NS
|
||||
@@ -898,7 +899,7 @@ PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
return XML_TOK_INVALID;
|
||||
}
|
||||
}
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case BT_AMP:
|
||||
case BT_LT:
|
||||
case BT_NONXML:
|
||||
@@ -1059,7 +1060,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
/* indicate that this might be part of a CR/LF pair */
|
||||
return -XML_TOK_PROLOG_S;
|
||||
}
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
case BT_S:
|
||||
case BT_LF:
|
||||
for (;;) {
|
||||
@@ -1074,7 +1075,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
/* don't split CR/LF pair */
|
||||
if (ptr + MINBPC(enc) != end)
|
||||
break;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
default:
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_PROLOG_S;
|
||||
@@ -1189,7 +1190,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
tok = XML_TOK_NMTOKEN;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
default:
|
||||
*nextTokPtr = ptr;
|
||||
return XML_TOK_INVALID;
|
||||
@@ -1484,7 +1485,7 @@ PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
case BT_NMSTRT:
|
||||
if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
|
||||
break;
|
||||
/* fall through */
|
||||
EXPAT_FALLTHROUGH;
|
||||
default:
|
||||
switch (BYTE_TO_ASCII(enc, ptr)) {
|
||||
case 0x24: /* $ */
|
||||
|
||||
@@ -103,10 +103,11 @@
|
||||
<ClInclude Include="..\Modules\expat\expat.h" />
|
||||
<ClInclude Include="..\Modules\expat\expat_config.h" />
|
||||
<ClInclude Include="..\Modules\expat\expat_external.h" />
|
||||
<ClInclude Include="..\Modules\expat\fallthrough.h" />
|
||||
<ClInclude Include="..\Modules\expat\iasciitab.h" />
|
||||
<ClInclude Include="..\Modules\expat\internal.h" />
|
||||
<ClInclude Include="..\Modules\expat\latin1tab.h" />
|
||||
<ClInclude Include="..\Modules\expat\macconfig.h" />
|
||||
<ClInclude Include="..\Modules\expat\memory_sanitizer.h" />
|
||||
<ClInclude Include="..\Modules\expat\nametab.h" />
|
||||
<ClInclude Include="..\Modules\expat\pyexpatns.h" />
|
||||
<ClInclude Include="..\Modules\expat\utf8tab.h" />
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
<ClInclude Include="..\Modules\expat\expat_external.h">
|
||||
<Filter>Header Files\expat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Modules\expat\fallthrough.h">
|
||||
<Filter>Header Files\expat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Modules\expat\iasciitab.h">
|
||||
<Filter>Header Files\expat</Filter>
|
||||
</ClInclude>
|
||||
@@ -42,7 +45,7 @@
|
||||
<ClInclude Include="..\Modules\expat\latin1tab.h">
|
||||
<Filter>Header Files\expat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Modules\expat\macconfig.h">
|
||||
<ClInclude Include="..\Modules\expat\memory_sanitizer.h">
|
||||
<Filter>Header Files\expat</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Modules\expat\nametab.h">
|
||||
|
||||
@@ -95,6 +95,8 @@
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Modules\expat\fallthrough.h" />
|
||||
<ClInclude Include="..\Modules\expat\memory_sanitizer.h" />
|
||||
<ClInclude Include="..\Modules\expat\xmlrole.h" />
|
||||
<ClInclude Include="..\Modules\expat\xmltok.h" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Modules\expat\fallthrough.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Modules\expat\memory_sanitizer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Modules\expat\xmlrole.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
||||
Reference in new issue
Block a user