Skip to content

Commit

Permalink
encoding: Deprecate xmlByteConsumed
Browse files Browse the repository at this point in the history
This was only used by Chromium/WebKit to detect whether xmlParseContent
really succeeded. It's a horrible, overcomplicated hack.

See 8c5848b and #767.
  • Loading branch information
nwellnhof committed Jul 13, 2024
1 parent 440d11a commit 69f12d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -1905,6 +1905,8 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
* xmlByteConsumed:
* @ctxt: an XML parser context
*
* DEPRECATED: Don't use.
*
* This function provides the current index of the parser relative
* to the start of the current entity. This function is computed in
* bytes from the beginning starting at zero and finishing at the
Expand Down
4 changes: 1 addition & 3 deletions include/libxml/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -1347,9 +1347,7 @@ XMLPUBFUN xmlParserInputPtr
const char *ID,
xmlParserCtxtPtr ctxt);

/*
* Index lookup, actually implemented in the encoding module
*/
XML_DEPRECATED
XMLPUBFUN long
xmlByteConsumed (xmlParserCtxtPtr ctxt);

Expand Down
1 change: 1 addition & 0 deletions python/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ def enum(type, name, value):
'namePush': True,
'nodePop': True,
'nodePush': True,
'xmlByteConsumed': True,
'xmlCheckFilename': True,
'xmlCheckLanguageID': True,
'xmlCleanupCharEncodingHandlers': True,
Expand Down

0 comments on commit 69f12d6

Please sign in to comment.