Commit aa47570b authored by Thomas Heller's avatar Thomas Heller

Use int 0 as default defval for LCID if nothing has been supplied.

parent b2167614
...@@ -2840,9 +2840,14 @@ _build_callargs(CFuncPtrObject *self, PyObject *argtypes, ...@@ -2840,9 +2840,14 @@ _build_callargs(CFuncPtrObject *self, PyObject *argtypes,
switch (flag & (PARAMFLAG_FIN | PARAMFLAG_FOUT | PARAMFLAG_FLCID)) { switch (flag & (PARAMFLAG_FIN | PARAMFLAG_FOUT | PARAMFLAG_FLCID)) {
case PARAMFLAG_FIN | PARAMFLAG_FLCID: case PARAMFLAG_FIN | PARAMFLAG_FLCID:
/* ['in', 'lcid'] parameter. Always taken from defval */ /* ['in', 'lcid'] parameter. Always taken from defval,
assert(defval); if given, else the integer 0. */
Py_INCREF(defval); if (defval == NULL) {
defval = PyInt_FromLong(0);
if (defval == NULL)
goto error;
} else
Py_INCREF(defval);
PyTuple_SET_ITEM(callargs, i, defval); PyTuple_SET_ITEM(callargs, i, defval);
break; break;
case (PARAMFLAG_FIN | PARAMFLAG_FOUT): case (PARAMFLAG_FIN | PARAMFLAG_FOUT):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment