summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-28 02:07:53 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-28 02:07:53 (GMT)
commitd7e1b2bd17cee31bb581a71fff20101be0b34bc6 (patch)
treea30973b18a8b5bf84e25eae590181cce9a59a217 /Objects/fileobject.c
parent908caac52e8e62baa1ee54e4e650e1cd3ac37907 (diff)
downloadcpython-d7e1b2bd17cee31bb581a71fff20101be0b34bc6.zip
cpython-d7e1b2bd17cee31bb581a71fff20101be0b34bc6.tar.gz
cpython-d7e1b2bd17cee31bb581a71fff20101be0b34bc6.tar.bz2
static PyObject* variables should use PyString_InternFromString() instead of PyObject_FromString() to store a python string in a function level static var.
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index a5a42fc..eb05cda 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -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;
}