From 1680713e524016d93a94114c4a874ad71a090b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Fri, 25 May 2007 13:52:07 +0000 Subject: 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. --- Objects/boolobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Objects/boolobject.c') diff --git a/Objects/boolobject.c b/Objects/boolobject.c index 0a9f958ff6..b0170f6085 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; } -- cgit v1.2.1