diff options
author | Christian Heimes <christian@cheimes.de> | 2008-01-28 02:07:53 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-01-28 02:07:53 (GMT) |
commit | d7e1b2bd17cee31bb581a71fff20101be0b34bc6 (patch) | |
tree | a30973b18a8b5bf84e25eae590181cce9a59a217 /Objects/abstract.c | |
parent | 908caac52e8e62baa1ee54e4e650e1cd3ac37907 (diff) | |
download | cpython-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/abstract.c')
-rw-r--r-- | Objects/abstract.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 4c8ef83..830fe82 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2142,7 +2142,7 @@ abstract_get_bases(PyObject *cls) PyObject *bases; if (__bases__ == NULL) { - __bases__ = PyString_FromString("__bases__"); + __bases__ = PyString_InternFromString("__bases__"); if (__bases__ == NULL) return NULL; } @@ -2220,7 +2220,7 @@ recursive_isinstance(PyObject *inst, PyObject *cls, int recursion_depth) int retval = 0; if (__class__ == NULL) { - __class__ = PyString_FromString("__class__"); + __class__ = PyString_InternFromString("__class__"); if (__class__ == NULL) return -1; } |