mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Generate deprecation warnings for old SAX API
This commit is contained in:
@ -146,6 +146,7 @@ XMLPUBFUN void XMLCALL
|
|||||||
int len);
|
int len);
|
||||||
|
|
||||||
#ifdef LIBXML_SAX1_ENABLED
|
#ifdef LIBXML_SAX1_ENABLED
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSAXDefaultVersion (int version);
|
xmlSAXDefaultVersion (int version);
|
||||||
#endif /* LIBXML_SAX1_ENABLED */
|
#endif /* LIBXML_SAX1_ENABLED */
|
||||||
|
@ -861,11 +861,14 @@ XMLPUBFUN int XMLCALL
|
|||||||
/*
|
/*
|
||||||
* Recovery mode
|
* Recovery mode
|
||||||
*/
|
*/
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlRecoverDoc (const xmlChar *cur);
|
xmlRecoverDoc (const xmlChar *cur);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlRecoverMemory (const char *buffer,
|
xmlRecoverMemory (const char *buffer,
|
||||||
int size);
|
int size);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlRecoverFile (const char *filename);
|
xmlRecoverFile (const char *filename);
|
||||||
#endif /* LIBXML_SAX1_ENABLED */
|
#endif /* LIBXML_SAX1_ENABLED */
|
||||||
@ -878,47 +881,57 @@ XMLPUBFUN int XMLCALL
|
|||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
|
xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
|
||||||
#ifdef LIBXML_SAX1_ENABLED
|
#ifdef LIBXML_SAX1_ENABLED
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
|
xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
const char *filename);
|
const char *filename);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
|
xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
const char *buffer,
|
const char *buffer,
|
||||||
int size);
|
int size);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
|
xmlSAXParseDoc (xmlSAXHandlerPtr sax,
|
||||||
const xmlChar *cur,
|
const xmlChar *cur,
|
||||||
int recovery);
|
int recovery);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
|
xmlSAXParseMemory (xmlSAXHandlerPtr sax,
|
||||||
const char *buffer,
|
const char *buffer,
|
||||||
int size,
|
int size,
|
||||||
int recovery);
|
int recovery);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
|
xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
|
||||||
const char *buffer,
|
const char *buffer,
|
||||||
int size,
|
int size,
|
||||||
int recovery,
|
int recovery,
|
||||||
void *data);
|
void *data);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlSAXParseFile (xmlSAXHandlerPtr sax,
|
xmlSAXParseFile (xmlSAXHandlerPtr sax,
|
||||||
const char *filename,
|
const char *filename,
|
||||||
int recovery);
|
int recovery);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
|
xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
|
||||||
const char *filename,
|
const char *filename,
|
||||||
int recovery,
|
int recovery,
|
||||||
void *data);
|
void *data);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
|
xmlSAXParseEntity (xmlSAXHandlerPtr sax,
|
||||||
const char *filename);
|
const char *filename);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDocPtr XMLCALL
|
XMLPUBFUN xmlDocPtr XMLCALL
|
||||||
xmlParseEntity (const char *filename);
|
xmlParseEntity (const char *filename);
|
||||||
#endif /* LIBXML_SAX1_ENABLED */
|
#endif /* LIBXML_SAX1_ENABLED */
|
||||||
|
|
||||||
#ifdef LIBXML_VALID_ENABLED
|
#ifdef LIBXML_VALID_ENABLED
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN xmlDtdPtr XMLCALL
|
XMLPUBFUN xmlDtdPtr XMLCALL
|
||||||
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
|
xmlSAXParseDTD (xmlSAXHandlerPtr sax,
|
||||||
const xmlChar *ExternalID,
|
const xmlChar *ExternalID,
|
||||||
@ -955,6 +968,7 @@ XMLPUBFUN int XMLCALL
|
|||||||
const xmlChar *string,
|
const xmlChar *string,
|
||||||
xmlNodePtr *lst,
|
xmlNodePtr *lst,
|
||||||
int recover);
|
int recover);
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN int XMLCALL
|
XMLPUBFUN int XMLCALL
|
||||||
xmlParseExternalEntity (xmlDocPtr doc,
|
xmlParseExternalEntity (xmlDocPtr doc,
|
||||||
xmlSAXHandlerPtr sax,
|
xmlSAXHandlerPtr sax,
|
||||||
@ -984,6 +998,7 @@ XMLPUBFUN void XMLCALL
|
|||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
|
xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
|
||||||
#ifdef LIBXML_SAX1_ENABLED
|
#ifdef LIBXML_SAX1_ENABLED
|
||||||
|
XML_DEPRECATED
|
||||||
XMLPUBFUN void XMLCALL
|
XMLPUBFUN void XMLCALL
|
||||||
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
|
xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
|
||||||
const xmlChar* buffer,
|
const xmlChar* buffer,
|
||||||
|
@ -310,15 +310,21 @@ deprecated_funcs = {
|
|||||||
'xmlNanoFTPProxy': True,
|
'xmlNanoFTPProxy': True,
|
||||||
'xmlNanoFTPScanProxy': True,
|
'xmlNanoFTPScanProxy': True,
|
||||||
'xmlNewGlobalNs': True,
|
'xmlNewGlobalNs': True,
|
||||||
|
'xmlParseEntity': True,
|
||||||
'xmlParseNamespace': True,
|
'xmlParseNamespace': True,
|
||||||
'xmlParseQuotedString': True,
|
'xmlParseQuotedString': True,
|
||||||
'xmlParserHandleReference': True,
|
'xmlParserHandleReference': True,
|
||||||
|
'xmlRecoverDoc': True,
|
||||||
|
'xmlRecoverFile': True,
|
||||||
|
'xmlRecoverMemory': True,
|
||||||
'xmlRelaxNGCleanupTypes': True,
|
'xmlRelaxNGCleanupTypes': True,
|
||||||
'xmlRelaxNGInitTypes': True,
|
'xmlRelaxNGInitTypes': True,
|
||||||
'xmlRemoveRef': True,
|
'xmlRemoveRef': True,
|
||||||
|
'xmlSAXDefaultVersion': True,
|
||||||
'xmlScanName': True,
|
'xmlScanName': True,
|
||||||
'xmlSchemaCleanupTypes': True,
|
'xmlSchemaCleanupTypes': True,
|
||||||
'xmlSchemaInitTypes': True,
|
'xmlSchemaInitTypes': True,
|
||||||
|
'xmlSetupParserForBuffer': True,
|
||||||
'xmlThrDefDefaultBufferSize': True,
|
'xmlThrDefDefaultBufferSize': True,
|
||||||
'xmlThrDefLineNumbersDefaultValue': True,
|
'xmlThrDefLineNumbersDefaultValue': True,
|
||||||
'xmlThrDefPedanticParserDefaultValue': True,
|
'xmlThrDefPedanticParserDefaultValue': True,
|
||||||
|
@ -1524,6 +1524,7 @@ libxml_xmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
|||||||
const char *URI;
|
const char *URI;
|
||||||
PyObject *pyobj_SAX = NULL;
|
PyObject *pyobj_SAX = NULL;
|
||||||
xmlSAXHandlerPtr SAX = NULL;
|
xmlSAXHandlerPtr SAX = NULL;
|
||||||
|
xmlParserCtxtPtr ctxt;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, (char *) "Osi:xmlSAXParseFile", &pyobj_SAX,
|
if (!PyArg_ParseTuple(args, (char *) "Osi:xmlSAXParseFile", &pyobj_SAX,
|
||||||
&URI, &recover))
|
&URI, &recover))
|
||||||
@ -1540,7 +1541,9 @@ libxml_xmlSAXParseFile(ATTRIBUTE_UNUSED PyObject * self, PyObject * args)
|
|||||||
SAX = &pythonSaxHandler;
|
SAX = &pythonSaxHandler;
|
||||||
Py_INCREF(pyobj_SAX);
|
Py_INCREF(pyobj_SAX);
|
||||||
/* The reference is released in pythonEndDocument() */
|
/* The reference is released in pythonEndDocument() */
|
||||||
xmlSAXUserParseFile(SAX, pyobj_SAX, URI);
|
ctxt = xmlNewSAXParserCtxt(SAX, pyobj_SAX);
|
||||||
|
xmlCtxtReadFile(ctxt, URI, NULL, 0);
|
||||||
|
xmlFreeParserCtxt(ctxt);
|
||||||
#endif /* LIBXML_SAX1_ENABLED */
|
#endif /* LIBXML_SAX1_ENABLED */
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return (Py_None);
|
return (Py_None);
|
||||||
|
Reference in New Issue
Block a user