diff options
Diffstat (limited to 'python/libxml.c')
-rw-r--r-- | python/libxml.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/libxml.c b/python/libxml.c index 2ae18560..bf4c652c 100644 --- a/python/libxml.c +++ b/python/libxml.c @@ -1644,12 +1644,12 @@ libxml_xmlFreeTextReader(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) { xmlTextReaderErrorFunc f; void *arg; - if (self == NULL) { + if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeTextReader", &pyobj_reader)) + return(NULL); + if (!PyCObject_Check(pyobj_reader)) { 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); |