Commit c4a4b013 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Add our annotations to _multiprocessing

parent e6b7d6c0
......@@ -255,16 +255,16 @@ init_multiprocessing(void)
temp = PyImport_ImportModule(PICKLE_MODULE);
if (!temp)
return;
pickle_dumps = PyObject_GetAttrString(temp, "dumps");
pickle_loads = PyObject_GetAttrString(temp, "loads");
pickle_protocol = PyObject_GetAttrString(temp, "HIGHEST_PROTOCOL");
pickle_dumps = PyGC_RegisterStaticConstant(PyObject_GetAttrString(temp, "dumps"));
pickle_loads = PyGC_RegisterStaticConstant(PyObject_GetAttrString(temp, "loads"));
pickle_protocol = PyGC_RegisterStaticConstant(PyObject_GetAttrString(temp, "HIGHEST_PROTOCOL"));
Py_XDECREF(temp);
/* Get copy of BufferTooShort */
temp = PyImport_ImportModule("multiprocessing");
if (!temp)
return;
BufferTooShort = PyObject_GetAttrString(temp, "BufferTooShort");
BufferTooShort = PyGC_RegisterStaticConstant(PyObject_GetAttrString(temp, "BufferTooShort"));
Py_XDECREF(temp);
/* Add connection type to module */
......@@ -291,6 +291,7 @@ init_multiprocessing(void)
return;
PyDict_SetItemString(SemLockType.tp_dict, "SEM_VALUE_MAX",
py_sem_value_max);
Py_DECREF(py_sem_value_max);
}
PyModule_AddObject(module, "SemLock", (PyObject*)&SemLockType);
#endif
......
......@@ -4779,6 +4779,8 @@ static void call_sys_exitfunc(void) {
PySys_WriteStderr("Error in sys.exitfunc:\n");
}
PyErr_Print();
} else {
Py_DECREF(res);
}
Py_DECREF(exitfunc);
}
......
# expected: reffail
import import_target
print import_target.x
......
# expected: reffail
import logging
import warnings
......
# expected: reffail
import multiprocessing
# from https://docs.python.org/2/library/multiprocessing.html
......
# expected: reffail
# skip-if: '-x' in EXTRA_JIT_ARGS
# - too slow
# Note: CPython doesn't pass this test
......
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