Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Closed
Description
Bug report
This call is problematic:
Line 465 inf526314
#defineSET(i,val) PyStructSequence_SET_ITEM(v, i, PyLong_FromLong((long) val)) |
It can returnNULL
in theory.
These calls also can returnNULL
:
Lines 477 to 478 inf526314
PyStructSequence_SET_ITEM(v,9, PyUnicode_DecodeLocale(p->tm_zone,"surrogateescape")); Lines 481 to 482 inf526314
PyStructSequence_SET_ITEM(v,9, PyUnicode_DecodeLocale(zone,"surrogateescape"));
This error guard in the end will only show the last error:
Lines 486 to 489 inf526314
if (PyErr_Occurred()) { | |
Py_XDECREF(v); | |
returnNULL; | |
} |
XDECREF
whenv
cannot beNULL
at this point?Refs#116714
I will send a PR adding our regular macro for the job.