summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-01-28 02:38:20 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-01-28 02:38:20 (GMT)
commitfe82e774ea203de277968216126e26d0d09b3a15 (patch)
treefa12e8ce128288a56c0566d76aeaa05b8dd3e6d2 /Modules/_ctypes
parent26855635833fcd3f15786b4a9d4241ded293404c (diff)
downloadcpython-fe82e774ea203de277968216126e26d0d09b3a15.zip
cpython-fe82e774ea203de277968216126e26d0d09b3a15.tar.gz
cpython-fe82e774ea203de277968216126e26d0d09b3a15.tar.bz2
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. ........
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/_ctypes.c6
-rw-r--r--Modules/_ctypes/callbacks.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index 49f55c8..c10f627 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -1530,9 +1530,9 @@ static PyObject *CreateSwappedType(PyTypeObject *type, PyObject *args, PyObject
if (suffix == NULL)
#ifdef WORDS_BIGENDIAN
- suffix = PyUnicode_FromString("_le");
+ suffix = PyUnicode_InternFromString("_le");
#else
- suffix = PyUnicode_FromString("_be");
+ suffix = PyUnicode_InternFromString("_be");
#endif
newname = PyUnicode_Concat(name, suffix);
@@ -4276,7 +4276,7 @@ Simple_repr(CDataObject *self)
}
if (format == NULL) {
- format = PyUnicode_FromString("%s(%r)");
+ format = PyUnicode_InternFromString("%s(%r)");
if (format == NULL)
return NULL;
}
diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c
index 6a1d2b7..964af1b 100644
--- a/Modules/_ctypes/callbacks.c
+++ b/Modules/_ctypes/callbacks.c
@@ -365,7 +365,7 @@ long Call_GetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
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 @@ long Call_CanUnloadNow(void)
static PyObject *context;
if (context == NULL)
- context = PyUnicode_FromString("_ctypes.DllCanUnloadNow");
+ context = PyUnicode_InternFromString("_ctypes.DllCanUnloadNow");
mod = PyImport_ImportModuleNoBlock("ctypes");
if (!mod) {