Skip to content

Commit 1107050

Browse files
authored
xml: Drop unused XML_GetCurrentByteCount() compatibility wrapper (#20476)
1 parent 9cd3673 commit 1107050

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

UPGRADING.INTERNALS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ PHP 8.6 INTERNALS UPGRADE NOTES
6060
- ext/xml:
6161
. Removed the XML_ExpatVersion() libxml compatibility wrapper,
6262
as it was unused.
63+
. Removed the XML_GetCurrentByteCount() libxml compatibility wrapper,
64+
as it was unused and could return the wrong result.
6365

6466
========================
6567
4. OpCode changes

ext/xml/compat.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -644,14 +644,6 @@ XML_GetCurrentByteIndex(XML_Parser parser)
644644
(parser->parser->input->cur - parser->parser->input->base);
645645
}
646646

647-
PHP_XML_API int
648-
XML_GetCurrentByteCount(XML_Parser parser)
649-
{
650-
/* TODO: this is identical to ByteIndex; it should probably
651-
* be different */
652-
return (int) XML_GetCurrentByteIndex(parser);
653-
}
654-
655647
PHP_XML_API void
656648
XML_ParserFree(XML_Parser parser)
657649
{

ext/xml/expat_compat.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ PHP_XML_API const XML_Char *XML_ErrorString(int);
147147
PHP_XML_API int XML_GetCurrentLineNumber(XML_Parser);
148148
PHP_XML_API int XML_GetCurrentColumnNumber(XML_Parser);
149149
PHP_XML_API long XML_GetCurrentByteIndex(XML_Parser);
150-
PHP_XML_API int XML_GetCurrentByteCount(XML_Parser);
151150
PHP_XML_API void XML_ParserFree(XML_Parser);
152151

153152
#elif defined(HAVE_LIBEXPAT)

0 commit comments

Comments
 (0)