mirror of
https://github.com/python/cpython.git
synced 2025-09-18 14:40:43 +00:00
Merged revisions 60379-60382 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r60381 | christian.heimes | 2008-01-28 03:07:53 +0100 (Mon, 28 Jan 2008) | 1 line 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:
parent
2685563583
commit
fe82e774ea
7 changed files with 20 additions and 19 deletions
|
@ -1463,7 +1463,7 @@ builtin_round(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
}
|
||||
|
||||
if (round_str == NULL) {
|
||||
round_str = PyUnicode_FromString("__round__");
|
||||
round_str = PyUnicode_InternFromString("__round__");
|
||||
if (round_str == NULL)
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1582,7 +1582,7 @@ builtin_trunc(PyObject *self, PyObject *number)
|
|||
}
|
||||
|
||||
if (trunc_str == NULL) {
|
||||
trunc_str = PyUnicode_FromString("__trunc__");
|
||||
trunc_str = PyUnicode_InternFromString("__trunc__");
|
||||
if (trunc_str == NULL)
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue