summaryrefslogtreecommitdiffstats
path: root/Objects/boolobject.c
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-05-25 13:52:07 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-05-25 13:52:07 (GMT)
commit1680713e524016d93a94114c4a874ad71a090b95 (patch)
treeef1f75a1a9748b50ab4a4e66d4c81662062546f7 /Objects/boolobject.c
parent34a042d301d6ab88645046a6dfa6c38265ca4b39 (diff)
downloadcpython-1680713e524016d93a94114c4a874ad71a090b95.zip
cpython-1680713e524016d93a94114c4a874ad71a090b95.tar.gz
cpython-1680713e524016d93a94114c4a874ad71a090b95.tar.bz2
Add interning of unicode strings by copying the functionality from
stringobject.c. Intern "True" and "False" in bool_repr() again as it was in the 8bit string era.
Diffstat (limited to 'Objects/boolobject.c')
-rw-r--r--Objects/boolobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/boolobject.c b/Objects/boolobject.c
index 0a9f958..b0170f6 100644
--- a/Objects/boolobject.c
+++ b/Objects/boolobject.c
@@ -24,10 +24,10 @@ bool_repr(PyObject *self)
if (self == Py_True)
s = true_str ? true_str :
- (true_str = PyUnicode_FromString("True"));
+ (true_str = PyUnicode_InternFromString("True"));
else
s = false_str ? false_str :
- (false_str = PyUnicode_FromString("False"));
+ (false_str = PyUnicode_InternFromString("False"));
Py_XINCREF(s);
return s;
}