mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
added the close and getattribute methods of XmlTextReader. added the
* xmlreader.c doc/libxml2-api.xml: added the close and getattribute methods of XmlTextReader. * python/generator.py python/libxml_wrap.h python/types.c python/libxml2class.txt: added the reader to the Python bindings * python/tests/Makefile.am python/tests/reader.py: added a specific test for the Python bindings of the Reader APIs * parser.c: small cleanup. Daniel
This commit is contained in:
9
parser.c
9
parser.c
@ -1769,7 +1769,8 @@ xmlSplitQName(xmlParserCtxtPtr ctxt, const xmlChar *name, xmlChar **prefix) {
|
||||
int first = CUR_SCHAR(cur, l);
|
||||
|
||||
if (!IS_LETTER(first) && (first != '_')) {
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||
if ((ctxt != NULL) && (ctxt->sax != NULL) &&
|
||||
(ctxt->sax->error != NULL))
|
||||
ctxt->sax->error(ctxt->userData,
|
||||
"Name %s is not XML Namespace compliant\n",
|
||||
name);
|
||||
@ -1790,7 +1791,8 @@ xmlSplitQName(xmlParserCtxtPtr ctxt, const xmlChar *name, xmlChar **prefix) {
|
||||
|
||||
buffer = (xmlChar *) xmlMalloc(max * sizeof(xmlChar));
|
||||
if (buffer == NULL) {
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||
if ((ctxt != NULL) && (ctxt->sax != NULL) &&
|
||||
(ctxt->sax->error != NULL))
|
||||
ctxt->sax->error(ctxt->userData,
|
||||
"xmlSplitQName: out of memory\n");
|
||||
return(NULL);
|
||||
@ -1802,7 +1804,8 @@ xmlSplitQName(xmlParserCtxtPtr ctxt, const xmlChar *name, xmlChar **prefix) {
|
||||
buffer = (xmlChar *) xmlRealloc(buffer,
|
||||
max * sizeof(xmlChar));
|
||||
if (buffer == NULL) {
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||
if ((ctxt != NULL) && (ctxt->sax != NULL) &&
|
||||
(ctxt->sax->error != NULL))
|
||||
ctxt->sax->error(ctxt->userData,
|
||||
"xmlSplitQName: out of memory\n");
|
||||
return(NULL);
|
||||
|
Reference in New Issue
Block a user