be more defensive in the xmlReader python bindings fixing bug #124044

* python/libxml.c: be more defensive in the xmlReader python bindings
  fixing bug #124044
Daniel
This commit is contained in:
Daniel Veillard 2003-10-30 13:12:43 +00:00
parent e133dd8d13
commit bb3ba326e6
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Thu Oct 30 14:10:42 CET 2003 Daniel Veillard <daniel@veillard.com>
* python/libxml.c: be more defensive in the xmlReader python bindings
fixing bug #124044
Thu Oct 30 11:14:31 CET 2003 Daniel Veillard <daniel@veillard.com>
* valid.c: the a-posteriori DTD validation code was not validating

View File

@ -1644,9 +1644,17 @@ libxml_xmlFreeTextReader(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
xmlTextReaderErrorFunc f;
void *arg;
if (self == NULL) {
Py_INCREF(Py_None);
return(Py_None);
}
if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeTextReader", &pyobj_reader))
return(NULL);
reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
if (reader == NULL) {
Py_INCREF(Py_None);
return(Py_None);
}
xmlTextReaderGetErrorHandler(reader,&f,&arg);
if (arg != NULL) {