diff --git a/fuzz/genSeed.c b/fuzz/genSeed.c index 55c3ab60..ca129504 100644 --- a/fuzz/genSeed.c +++ b/fuzz/genSeed.c @@ -77,7 +77,7 @@ fuzzResourceRecorder(void *data ATTRIBUTE_UNUSED, const char *URL, } do { - len = xmlParserInputBufferGrow(in->buf, chunkSize); + len = xmlParserInputGrow(in, chunkSize); if (len < 0) { fprintf(stderr, "Error reading %s\n", URL); xmlFreeInputStream(in); diff --git a/include/libxml/parser.h b/include/libxml/parser.h index b31afc76..55c24344 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -1066,7 +1066,6 @@ XML_DEPRECATED XMLPUBFUN int xmlParserInputRead (xmlParserInputPtr in, int len); -XML_DEPRECATED XMLPUBFUN int xmlParserInputGrow (xmlParserInputPtr in, int len); diff --git a/include/libxml/xmlIO.h b/include/libxml/xmlIO.h index 8347e2ed..11d41a33 100644 --- a/include/libxml/xmlIO.h +++ b/include/libxml/xmlIO.h @@ -229,12 +229,15 @@ XMLPUBFUN xmlParserInputBufferPtr xmlInputCloseCallback ioclose, void *ioctx, xmlCharEncoding enc); +XML_DEPRECATED XMLPUBFUN int xmlParserInputBufferRead (xmlParserInputBufferPtr in, int len); +XML_DEPRECATED XMLPUBFUN int xmlParserInputBufferGrow (xmlParserInputBufferPtr in, int len); +XML_DEPRECATED XMLPUBFUN int xmlParserInputBufferPush (xmlParserInputBufferPtr in, int len, diff --git a/python/generator.py b/python/generator.py index f28a8150..2d6abacf 100755 --- a/python/generator.py +++ b/python/generator.py @@ -356,6 +356,9 @@ deprecated_funcs = { 'xmlParseVersionNum': True, 'xmlParseXMLDecl': True, 'xmlParserHandlePEReference': True, + 'xmlParserInputBufferGrow': True, + 'xmlParserInputBufferPush': True, + 'xmlParserInputBufferRead': True, 'xmlParserSetLineNumbers': True, 'xmlParserSetLoadSubset': True, 'xmlParserSetPedantic': True, diff --git a/xmlIO.c b/xmlIO.c index a76e1bc0..2787c650 100644 --- a/xmlIO.c +++ b/xmlIO.c @@ -1895,7 +1895,9 @@ xmlParserInputBufferCreateStatic(const char *mem, int size, * @str: C string * @flags: flags * - * Create an input buffer for a null-teriminated C string. + * DEPRECATED: Use xmlNewInputFromString. + * + * Create an input buffer for a null-terminated C string. * * Returns the new input buffer or NULL. */ @@ -2067,6 +2069,8 @@ xmlOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func) * @len: the size in bytes of the array. * @buf: an char array * + * DEPRECATED: Internal function, don't use. + * * Push the content of the arry in the input buffer * This routine handle the I18N transcoding to internal UTF-8 * This is used when operating the parser in progressive (push) mode. @@ -2136,6 +2140,8 @@ endOfInput (void * context ATTRIBUTE_UNUSED, * @in: a buffered parser input * @len: indicative value of the amount of chars to read * + * DEPRECATED: Internal function, don't use. + * * Grow up the content of the input buffer, the old data are preserved * This routine handle the I18N transcoding to internal UTF-8 * This routine is used when operating the parser in normal (pull) mode @@ -2224,9 +2230,9 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) { * @in: a buffered parser input * @len: indicative value of the amount of chars to read * - * Refresh the content of the input buffer, the old data are considered - * consumed - * This routine handle the I18N transcoding to internal UTF-8 + * DEPRECATED: Internal function, don't use. + * + * Same as xmlParserInputBufferGrow. * * Returns the number of chars read and stored in the buffer, or -1 * in case of error.