diff Python/bltinmodule.c @ 45029:ef2d3bf8383d

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. ........
author Christian Heimes <christian@cheimes.de>
date Mon, 28 Jan 2008 02:38:20 +0000
parents c0f048356c36
children b9ee31a26f38
line wrap: on
line diff
--- a/Python/bltinmodule.c	Sun Jan 27 23:50:43 2008 +0000
+++ b/Python/bltinmodule.c	Mon Jan 28 02:38:20 2008 +0000
@@ -1463,7 +1463,7 @@
 	}
 
 	if (round_str == NULL) {
-		round_str = PyUnicode_FromString("__round__");
+		round_str = PyUnicode_InternFromString("__round__");
 		if (round_str == NULL)
 			return NULL;
 	}
@@ -1582,7 +1582,7 @@
 	}
 
 	if (trunc_str == NULL) {
-		trunc_str = PyUnicode_FromString("__trunc__");
+		trunc_str = PyUnicode_InternFromString("__trunc__");
 		if (trunc_str == NULL)
 			return NULL;
 	}