diff Modules/_ctypes/callbacks.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 94ab572ed6dd
children 90e2146cb8a3
line wrap: on
line diff
--- a/Modules/_ctypes/callbacks.c	Sun Jan 27 23:50:43 2008 +0000
+++ b/Modules/_ctypes/callbacks.c	Mon Jan 28 02:38:20 2008 +0000
@@ -365,7 +365,7 @@
 	static PyObject *context;
 
 	if (context == NULL)
-		context = PyUnicode_FromString("_ctypes.DllGetClassObject");
+		context = PyUnicode_InternFromString("_ctypes.DllGetClassObject");
 
 	mod = PyImport_ImportModuleNoBlock("ctypes");
 	if (!mod) {
@@ -444,7 +444,7 @@
 	static PyObject *context;
 
 	if (context == NULL)
-		context = PyUnicode_FromString("_ctypes.DllCanUnloadNow");
+		context = PyUnicode_InternFromString("_ctypes.DllCanUnloadNow");
 
 	mod = PyImport_ImportModuleNoBlock("ctypes");
 	if (!mod) {