mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
check for error conditions in _json #3623
This commit is contained in:
parent
eaede315d1
commit
595e3cbb3d
2 changed files with 12 additions and 3 deletions
|
|
@ -179,11 +179,13 @@ raise_errmsg(char *msg, PyObject *s, Py_ssize_t end)
|
|||
errmsg_fn = PyObject_GetAttrString(decoder, "errmsg");
|
||||
if (errmsg_fn == NULL)
|
||||
return;
|
||||
Py_XDECREF(decoder);
|
||||
Py_DECREF(decoder);
|
||||
}
|
||||
pymsg = PyObject_CallFunction(errmsg_fn, "(zOn)", msg, s, end);
|
||||
PyErr_SetObject(PyExc_ValueError, pymsg);
|
||||
Py_DECREF(pymsg);
|
||||
if (pymsg) {
|
||||
PyErr_SetObject(PyExc_ValueError, pymsg);
|
||||
Py_DECREF(pymsg);
|
||||
}
|
||||
/*
|
||||
|
||||
def linecol(doc, pos):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue