Commit da075231 authored by Michael Droettboom's avatar Michael Droettboom

Fix error handling

parent 9990ed8a
......@@ -279,10 +279,11 @@ _python2js_cache(PyObject* x, PyObject* map)
PyObject* val = PyDict_GetItem(map, id);
int result;
if (val) {
result = hiwire_incref(PyLong_AsLong(val));
result = PyLong_AsLong(val);
if (result != -1) {
result = hiwire_incref(result);
}
Py_DECREF(val);
/* No need to check for result == -1, because that's the same */
/* value we use here to indicate error */
} else {
result = _python2js(x, map);
}
......
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