1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

revert xmlCreateDocParserCtxt() since this break the parseDoc() python

* parser.c: revert xmlCreateDocParserCtxt() since this break
  the parseDoc() python bindings
Daniel
This commit is contained in:
Daniel Veillard
2003-09-23 09:16:56 +00:00
parent 309f81d503
commit 1f40d68043
2 changed files with 6 additions and 30 deletions

View File

@ -11742,40 +11742,11 @@ int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data,
xmlParserCtxtPtr
xmlCreateDocParserCtxt(xmlChar *cur) {
int len;
xmlParserCtxtPtr ctxt;
xmlParserInputPtr input;
xmlParserInputBufferPtr buf;
if (cur == NULL)
return(NULL);
len = xmlStrlen(cur);
ctxt = xmlNewParserCtxt();
if (ctxt == NULL)
return(NULL);
buf = xmlParserInputBufferCreateStatic((char *)cur, len,
XML_CHAR_ENCODING_NONE);
if (buf == NULL) {
xmlFreeParserCtxt(ctxt);
return(NULL);
}
input = xmlNewInputStream(ctxt);
if (input == NULL) {
xmlFreeParserInputBuffer(buf);
xmlFreeParserCtxt(ctxt);
return(NULL);
}
input->filename = NULL;
input->buf = buf;
input->base = input->buf->buffer->content;
input->cur = input->buf->buffer->content;
input->end = &input->buf->buffer->content[input->buf->buffer->use];
inputPush(ctxt, input);
return(ctxt);
return(xmlCreateMemoryParserCtxt((char *)cur, len));
}
/**