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:
Christian Heimes 2008-01-28 02:38:20 +00:00
parent 2685563583
commit fe82e774ea
7 changed files with 20 additions and 19 deletions

View file

@ -131,7 +131,7 @@ static PyObject * math_ceil(PyObject *self, PyObject *number) {
PyObject *method;
if (ceil_str == NULL) {
ceil_str = PyUnicode_FromString("__ceil__");
ceil_str = PyUnicode_InternFromString("__ceil__");
if (ceil_str == NULL)
return NULL;
}
@ -171,7 +171,7 @@ static PyObject * math_floor(PyObject *self, PyObject *number) {
PyObject *method;
if (floor_str == NULL) {
floor_str = PyUnicode_FromString("__floor__");
floor_str = PyUnicode_InternFromString("__floor__");
if (floor_str == NULL)
return NULL;
}