static PyObject* variables should use PyString_InternFromString() instead of PyObject_FromString() to store a python string in a function level static var.

This commit is contained in:
Christian Heimes 2008-01-28 02:07:53 +00:00
parent 908caac52e
commit d7e1b2bd17
6 changed files with 17 additions and 16 deletions

View file

@ -1965,7 +1965,7 @@ file_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
assert(type != NULL && type->tp_alloc != NULL);
if (not_yet_string == NULL) {
not_yet_string = PyString_FromString("<uninitialized file>");
not_yet_string = PyString_InternFromString("<uninitialized file>");
if (not_yet_string == NULL)
return NULL;
}