File: | ./libxml.c |
Function: | libxml_xmlParserCtxtGetErrorHandler |
Error: | calling PyTuple_SetItem with NULL as argument 1 (py_retval) at ./libxml.c:1696 |
1680 static PyObject *
1681 libxml_xmlParserCtxtGetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
1682 {
1683 PyObject *py_retval;
1684 xmlParserCtxtPtr ctxt;
1685 xmlParserCtxtPyCtxtPtr pyCtxt;
1686 PyObject *pyobj_ctxt;
1687
1688 if (!PyArg_ParseTuple(args, (char *)"O:xmlParserCtxtGetErrorHandler",
when PyArg_ParseTuple() succeeds
taking False path
1689 &pyobj_ctxt))
1690 return(NULL);
1691 ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
taking True path
1692 py_retval = PyTuple_New(2);
when PyTuple_New() fails
1693 if (ctxt->_private != NULL) {
when treating unknown struct xmlParserCtxt * from ./libxml.c:1691 as non-NULL
when treating unknown void * from ./libxml.c:1693 as non-NULL
taking True path
1694 pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private;
1695
1696 PyTuple_SetItem(py_retval, 0, pyCtxt->f);
when treating unknown void * from ./libxml.c:1694 as non-NULL
calling PyTuple_SetItem with NULL as argument 1 (py_retval) at ./libxml.c:1696
PyTuple_SetItem() invokes Py_TYPE() on the pointer via the PyTuple_Check() macro, thus accessing (NULL)->ob_type
1697 Py_XINCREF(pyCtxt->f);
1698 PyTuple_SetItem(py_retval, 1, pyCtxt->arg);
1699 Py_XINCREF(pyCtxt->arg);
1700 }
1701 else {
1702 /* no python error handler registered */
1703 PyTuple_SetItem(py_retval, 0, Py_None);
1704 Py_XINCREF(Py_None);
1705 PyTuple_SetItem(py_retval, 1, Py_None);
1706 Py_XINCREF(Py_None);
1707 }
1708 return(py_retval);
1709 }
File: | ./libxml.c |
Function: | libxml_xmlParserCtxtGetErrorHandler |
Error: | calling PyTuple_SetItem with NULL as argument 1 (py_retval) at ./libxml.c:1703 |
1680 static PyObject *
1681 libxml_xmlParserCtxtGetErrorHandler(ATTRIBUTE_UNUSED PyObject *self, PyObject *args)
1682 {
1683 PyObject *py_retval;
1684 xmlParserCtxtPtr ctxt;
1685 xmlParserCtxtPyCtxtPtr pyCtxt;
1686 PyObject *pyobj_ctxt;
1687
1688 if (!PyArg_ParseTuple(args, (char *)"O:xmlParserCtxtGetErrorHandler",
when PyArg_ParseTuple() succeeds
taking False path
1689 &pyobj_ctxt))
1690 return(NULL);
1691 ctxt = (xmlParserCtxtPtr) PyparserCtxt_Get(pyobj_ctxt);
taking True path
1692 py_retval = PyTuple_New(2);
when PyTuple_New() fails
1693 if (ctxt->_private != NULL) {
when treating unknown struct xmlParserCtxt * from ./libxml.c:1691 as non-NULL
when treating unknown void * from ./libxml.c:1693 as NULL
taking False path
1694 pyCtxt = (xmlParserCtxtPyCtxtPtr)ctxt->_private;
1695
1696 PyTuple_SetItem(py_retval, 0, pyCtxt->f);
1697 Py_XINCREF(pyCtxt->f);
1698 PyTuple_SetItem(py_retval, 1, pyCtxt->arg);
1699 Py_XINCREF(pyCtxt->arg);
1700 }
1701 else {
1702 /* no python error handler registered */
1703 PyTuple_SetItem(py_retval, 0, Py_None);
calling PyTuple_SetItem with NULL as argument 1 (py_retval) at ./libxml.c:1703
PyTuple_SetItem() invokes Py_TYPE() on the pointer via the PyTuple_Check() macro, thus accessing (NULL)->ob_type
1704 Py_XINCREF(Py_None);
1705 PyTuple_SetItem(py_retval, 1, Py_None);
1706 Py_XINCREF(Py_None);
1707 }
1708 return(py_retval);
1709 }