Commit f923dab5 authored by Marius Wachtler's avatar Marius Wachtler

parser module: register static object

parent b85cb05f
# expected: reffail
# - leaked refs
import parser
import unittest
import sys
......
......@@ -3477,7 +3477,7 @@ initparser(void)
PyObject *func, *pickler;
func = PyObject_GetAttrString(copyreg, "pickle");
pickle_constructor = PyObject_GetAttrString(module, "sequence2st");
pickle_constructor = PyGC_RegisterStaticConstant(PyObject_GetAttrString(module, "sequence2st"));
pickler = PyObject_GetAttrString(module, "_pickler");
Py_XINCREF(pickle_constructor);
if ((func != NULL) && (pickle_constructor != NULL)
......
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