Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ LIBEXPAT_HEADERS= \
Modules/expat/expat_config.h \
Modules/expat/expat_external.h \
Modules/expat/fallthrough.h \
Modules/expat/hash_table.h \
Modules/expat/iasciitab.h \
Modules/expat/internal.h \
Modules/expat/latin1tab.h \
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Update bundled `libexpat <https://libexpat.github.io/>`_ to version 2.8.4.
Update bundled `libexpat <https://libexpat.github.io/>`_ to version 2.8.5.
67 changes: 43 additions & 24 deletions Misc/sbom.spdx.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Modules/expat/expat.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Copyright (c) 2023 Sony Corporation / Snild Dolkow <snild@sony.com>
Copyright (c) 2024 Taichi Haradaguchi <20001722@ymail.ne.jp>
Copyright (c) 2025 Matthew Fernandez <matthew.fernandez@gmail.com>
Copyright (c) 2026 Braian Plaku <braianplaku@gmail.com>
Licensed under the MIT license:

Permission is hereby granted, free of charge, to any person obtaining
Expand Down Expand Up @@ -921,7 +922,9 @@ XML_SetParamEntityParsing(XML_Parser parser,
Returns 1 if successful, 0 when called after parsing has started.
Note: If parser == NULL, the function will do nothing and return 0.
DEPRECATED since Expat 2.8.0.
Please use XML_SetHashSalt16Bytes instead.
*/
XML_ATTR_DEPRECATED("please use XML_SetHashSalt16Bytes instead")
XMLPARSEAPI(int)
XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt);

Expand Down Expand Up @@ -1040,8 +1043,11 @@ enum XML_FeatureEnum {
XML_FEATURE_MIN_SIZE,
XML_FEATURE_SIZEOF_XML_CHAR,
XML_FEATURE_SIZEOF_XML_LCHAR,
/* Added in Expat 2.0.0. */
XML_FEATURE_NS,
/* Added in Expat 2.0.1. */
XML_FEATURE_LARGE_SIZE,
/* Added in Expat 2.1.0. */
XML_FEATURE_ATTR_INFO,
/* Added in Expat 2.4.0. */
XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT,
Expand Down Expand Up @@ -1096,7 +1102,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled);
*/
# define XML_MAJOR_VERSION 2
# define XML_MINOR_VERSION 8
# define XML_MICRO_VERSION 4
# define XML_MICRO_VERSION 5

# ifdef __cplusplus
}
Expand Down
12 changes: 12 additions & 0 deletions Modules/expat/expat_external.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
Copyright (c) 2026 Matthew Fernandez <matthew.fernandez@gmail.com>
Copyright (c) 2026 Braian Plaku <braianplaku@gmail.com>
Licensed under the MIT license:

Permission is hereby granted, free of charge, to any person obtaining
Expand Down Expand Up @@ -128,6 +129,17 @@
# define XML_ATTR_ALLOC_SIZE(x)
# endif

/* Marks a function that Expat still provides but that callers should move off
of. */
# if defined(__clang__) || defined(__GNUC__)
# define XML_ATTR_DEPRECATED(message) \
__attribute__((__deprecated__(message)))
# elif defined(_MSC_VER)
# define XML_ATTR_DEPRECATED(message) __declspec(deprecated(message))
# else
# define XML_ATTR_DEPRECATED(message) // empty i.e. no deprecation
# endif

# define XMLPARSEAPI(type) XMLIMPORT type XMLCALL

# ifdef __cplusplus
Expand Down
78 changes: 78 additions & 0 deletions Modules/expat/hash_table.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/* Hash table related internal API
__ __ _
___\ \/ /_ __ __ _| |_
/ _ \\ /| '_ \ / _` | __|
| __// \| |_) | (_| | |_
\___/_/\_\ .__/ \__,_|\__|
|_| XML parser
Copyright (c) 2026 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.
SPDX-License-Identifier: MIT
*/

#if ! defined(HASH_TABLE_H)
# define HASH_TABLE_H 1

# include "expat.h" // for XML_Bool, XML_Parser
# include "internal.h" // for XML_NONTESTING_STATIC

# include <stddef.h> // for size_t

typedef const XML_Char *KEY;

typedef struct {
KEY name;
} NAMED;

typedef struct {
NAMED **v;
unsigned char power;
size_t size;
size_t used;
XML_Parser parser;
} HASH_TABLE;

typedef struct {
NAMED **p;
NAMED **end;
} HASH_TABLE_ITER;

XML_NONTESTING_STATIC NAMED *lookupWithLength(XML_Parser parser,
HASH_TABLE *table, KEY name,
size_t nameLen,
size_t createSize);
XML_NONTESTING_STATIC NAMED *lookup(XML_Parser parser, HASH_TABLE *table,
KEY name, size_t createSize);

XML_NONTESTING_STATIC void hashTableInit(HASH_TABLE *table, XML_Parser parser);
XML_NONTESTING_STATIC void hashTableClear(HASH_TABLE *table);
XML_NONTESTING_STATIC void hashTableDestroy(HASH_TABLE *table);
XML_NONTESTING_STATIC void hashTableIterInit(HASH_TABLE_ITER *iter,
const HASH_TABLE *table);
XML_NONTESTING_STATIC NAMED *hashTableIterNext(HASH_TABLE_ITER *iter);

XML_NONTESTING_STATIC XML_Bool keyeq(KEY s1, size_t s1len, KEY s2);
XML_NONTESTING_STATIC size_t keylen(KEY s);

#endif // ! defined(HASH_TABLE_H)
Loading
Loading