diff --git a/include/libxml/parserInternals.h b/include/libxml/parserInternals.h index ab512499..513981ea 100644 --- a/include/libxml/parserInternals.h +++ b/include/libxml/parserInternals.h @@ -330,6 +330,7 @@ XMLPUBFUN int XMLPUBFUN xmlParserInputPtr xmlNewStringInputStream (xmlParserCtxtPtr ctxt, const xmlChar *buffer); +XML_DEPRECATED XMLPUBFUN xmlParserInputPtr xmlNewEntityInputStream (xmlParserCtxtPtr ctxt, xmlEntityPtr entity); @@ -551,29 +552,38 @@ XMLPUBFUN xmlChar * /* * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP. */ +XML_DEPRECATED XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt, xmlNodePtr value); +XML_DEPRECATED XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt); XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt, xmlParserInputPtr value); XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt); +XML_DEPRECATED XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt); +XML_DEPRECATED XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt, const xmlChar *value); /* * other commodities shared between parser.c and parserInternals. */ +XML_DEPRECATED XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt); +XML_DEPRECATED XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt, const xmlChar *cur, int *len); +XML_DEPRECATED XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt); +XML_DEPRECATED XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang); /* * Really core function shared with HTML parser. */ +XML_DEPRECATED XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt, int *len); XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out, @@ -581,6 +591,7 @@ XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out, XMLPUBFUN int xmlCopyChar (int len, xmlChar *out, int val); +XML_DEPRECATED XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt); XML_DEPRECATED XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in); diff --git a/parser.c b/parser.c index 9ed64c9e..c6383f6e 100644 --- a/parser.c +++ b/parser.c @@ -1376,6 +1376,8 @@ xmlCleanSpecialAttr(xmlParserCtxtPtr ctxt) * xmlCheckLanguageID: * @lang: pointer to the string value * + * DEPRECATED: Internal function, do not use. + * * Checks that the value conforms to the LanguageID production: * * NOTE: this is somewhat deprecated, those productions were removed from @@ -1750,6 +1752,8 @@ inputPop(xmlParserCtxtPtr ctxt) * @ctxt: an XML parser context * @value: the element node * + * DEPRECATED: Internal function, do not use. + * * Pushes a new element node on top of the node stack * * Returns -1 in case of error, the index in the stack otherwise @@ -1788,6 +1792,8 @@ nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value) * nodePop: * @ctxt: an XML parser context * + * DEPRECATED: Internal function, do not use. + * * Pops the top element node from the node stack * * Returns the node just removed @@ -1899,6 +1905,8 @@ nameNsPop(xmlParserCtxtPtr ctxt) * @ctxt: an XML parser context * @value: the element name * + * DEPRECATED: Internal function, do not use. + * * Pushes a new element name on top of the name stack * * Returns -1 in case of error, the index in the stack otherwise @@ -1926,10 +1934,13 @@ mem_error: xmlErrMemory(ctxt, NULL); return (-1); } + /** * namePop: * @ctxt: an XML parser context * + * DEPRECATED: Internal function, do not use. + * * Pops the top element name from the name stack * * Returns the name just removed @@ -2098,6 +2109,8 @@ static int spacePop(xmlParserCtxtPtr ctxt) { * xmlSkipBlankChars: * @ctxt: the XML parser context * + * DEPRECATED: Internal function, do not use. + * * skip all blanks character found at that point in the input streams. * It pops up finished entities in the process if allowable at that point. * @@ -2473,6 +2486,8 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) { * xmlParserHandlePEReference: * @ctxt: the parser context * + * DEPRECATED: Internal function, do not use. + * * [69] PEReference ::= '%' Name ';' * * [ WFC: No Recursion ] diff --git a/parserInternals.c b/parserInternals.c index 95c91660..9eb226f1 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -513,6 +513,8 @@ xmlParserInputShrink(xmlParserInputPtr in) { * xmlNextChar: * @ctxt: the XML parser context * + * DEPRECATED: Internal function, do not use. + * * Skip to the next char input char. */ @@ -658,6 +660,8 @@ encoding_error: * @ctxt: the XML parser context * @len: pointer to the length of the char read * + * DEPRECATED: Internal function, do not use. + * * The current char value, if using UTF-8 this may actually span multiple * bytes in the input buffer. Implement the end of line normalization: * 2.11 End-of-Line Handling @@ -818,6 +822,8 @@ encoding_error: * @cur: pointer to the beginning of the char * @len: pointer to the length of the char read * + * DEPRECATED: Internal function, do not use. + * * The current char value, if using UTF-8 this may actually span multiple * bytes in the input buffer. * @@ -1394,6 +1400,8 @@ xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, * @ctxt: an XML parser context * @entity: an Entity pointer * + * DEPRECATED: Internal function, do not use. + * * Create a new input stream based on an xmlEntityPtr * * Returns the new input stream or NULL diff --git a/python/generator.py b/python/generator.py index 989c38e1..3a5db228 100755 --- a/python/generator.py +++ b/python/generator.py @@ -293,6 +293,11 @@ deprecated_funcs = { 'htmlInitAutoClose': True, 'htmlParseCharRef': True, 'htmlParseElement': True, + 'namePop': True, + 'namePush': True, + 'nodePop': True, + 'nodePush': True, + 'xmlCheckLanguageID': True, 'xmlCleanupCharEncodingHandlers': True, 'xmlCleanupGlobals': True, 'xmlDefaultSAXHandlerInit': True, @@ -312,6 +317,7 @@ deprecated_funcs = { 'xmlNanoFTPProxy': True, 'xmlNanoFTPScanProxy': True, 'xmlNewGlobalNs': True, + 'xmlNextChar': True, 'xmlParseAttValue': True, 'xmlParseAttributeListDecl': True, 'xmlParseCDSect': True, @@ -346,6 +352,7 @@ deprecated_funcs = { 'xmlParseVersionInfo': True, 'xmlParseVersionNum': True, 'xmlParseXMLDecl': True, + 'xmlParserHandlePEReference': True, 'xmlParserHandleReference': True, 'xmlRecoverDoc': True, 'xmlRecoverFile': True, @@ -358,6 +365,7 @@ deprecated_funcs = { 'xmlSchemaCleanupTypes': True, 'xmlSchemaInitTypes': True, 'xmlSetupParserForBuffer': True, + 'xmlSkipBlankChars': True, 'xmlStringDecodeEntities': True, 'xmlStringLenDecodeEntities': True, 'xmlThrDefDefaultBufferSize': True, diff --git a/testchar.c b/testchar.c index a3f2e4f4..e5916d09 100644 --- a/testchar.c +++ b/testchar.c @@ -5,6 +5,8 @@ * copy: see Copyright for the status of this software. */ +#define XML_DEPRECATED + #include #include #include