Commit 2b13b66e authored by Kevin Modzelewski's avatar Kevin Modzelewski

Ref fixes

parent e383ced8
......@@ -44,7 +44,7 @@ get_warnings_attr(const char *attr)
int result;
if (warnings_str == NULL) {
warnings_str = PyString_InternFromString("warnings");
warnings_str = PyGC_RegisterStaticConstant(PyString_InternFromString("warnings"));
if (warnings_str == NULL)
return NULL;
}
......@@ -658,12 +658,12 @@ warnings_warn_explicit(PyObject *self, PyObject *args, PyObject *kwds)
PyObject *returned;
if (get_source_name == NULL) {
get_source_name = PyString_InternFromString("get_source");
get_source_name = PyGC_RegisterStaticConstant(PyString_InternFromString("get_source"));
if (!get_source_name)
return NULL;
}
if (splitlines_name == NULL) {
splitlines_name = PyString_InternFromString("splitlines");
splitlines_name = PyGC_RegisterStaticConstant(PyString_InternFromString("splitlines"));
if (!splitlines_name)
return NULL;
}
......
This diff is collapsed.
......@@ -4334,6 +4334,7 @@ void setupRuntime() {
_PyExc_Init();
_PyImport_Init();
_PyImportHooks_Init();
_PyWarnings_Init();
PyType_Ready(&PyByteArrayIter_Type);
PyType_Ready(&PyCapsule_Type);
......
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