From 7888d0803d50fc3716839d0608bdf350cc0e3df4 Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Fri, 1 Aug 2008 01:06:32 +0000 Subject: Merged revisions 65339-65340,65342 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ........ r65339 | amaury.forgeotdarc | 2008-07-31 23:28:03 +0200 (jeu., 31 juil. 2008) | 5 lines #3479: unichr(2**32) used to return u'\x00'. The argument was fetched in a long, but PyUnicode_FromOrdinal takes an int. (why doesn't gcc issue a truncation warning in this case?) ........ r65340 | amaury.forgeotdarc | 2008-07-31 23:35:03 +0200 (jeu., 31 juil. 2008) | 2 lines Remove a dummy test that was checked in by mistake ........ r65342 | amaury.forgeotdarc | 2008-08-01 01:39:05 +0200 (ven., 01 août 2008) | 8 lines Correct a crash when two successive unicode allocations fail with a MemoryError: the freelist contained half-initialized objects with freed pointers. The comment /* XXX UNREF/NEWREF interface should be more symmetrical */ was copied from tupleobject.c, and appears in some other places. I sign the petition. ........ --- Python/bltinmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/bltinmodule.c') diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 723c307b8f..27a3d8c005 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -454,9 +454,9 @@ format_spec defaults to \"\""); static PyObject * builtin_chr(PyObject *self, PyObject *args) { - long x; + int x; - if (!PyArg_ParseTuple(args, "l:chr", &x)) + if (!PyArg_ParseTuple(args, "i:chr", &x)) return NULL; return PyUnicode_FromOrdinal(x); -- cgit v1.2.1