summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2008-04-13 09:33:24 (GMT)
committerChristian Heimes <christian@cheimes.de>2008-04-13 09:33:24 (GMT)
commit67153528489efaab1ef1d7bb2a067147c60d3713 (patch)
treec6fc25b7f83e9e1a03914d5dc6ff1eddb118447a /Python
parent0a4f8956e6a172d509160c5e80ed243999de246f (diff)
downloadcpython-67153528489efaab1ef1d7bb2a067147c60d3713.zip
cpython-67153528489efaab1ef1d7bb2a067147c60d3713.tar.gz
cpython-67153528489efaab1ef1d7bb2a067147c60d3713.tar.bz2
Use PyString_InternFromString instead of PyString_FromString for static vars
Diffstat (limited to 'Python')
-rw-r--r--Python/_warnings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index b815927..dc33343 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -44,7 +44,7 @@ get_warnings_attr(const char *attr)
int result;
if (warnings_str == NULL) {
- warnings_str = PyString_FromString("warnings");
+ warnings_str = PyString_InternFromString("warnings");
if (warnings_str == NULL)
return NULL;
}
@@ -605,12 +605,12 @@ warnings_warn_explicit(PyObject *self, PyObject *args, PyObject *kwds)
PyObject *returned;
if (get_source_name == NULL) {
- get_source_name = PyString_FromString("get_source");
+ get_source_name = PyString_InternFromString("get_source");
if (!get_source_name)
return NULL;
}
if (splitlines_name == NULL) {
- splitlines_name = PyString_FromString("splitlines");
+ splitlines_name = PyString_InternFromString("splitlines");
if (!splitlines_name)
return NULL;
}