mirror of
https://github.com/darlinghq/darling-libxml2.git
synced 2025-01-10 22:46:34 +00:00
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:
parent
e133dd8d13
commit
bb3ba326e6
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user