[pypy-commit] pypy py3k: Fix uninitialized variable in _testcapi.

amauryfa noreply at buildbot.pypy.org
Sun Apr 28 18:00:51 CEST 2013


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r63723:96314c1d3a60
Date: 2013-04-28 17:17 +0200
http://bitbucket.org/pypy/pypy/changeset/96314c1d3a60/

Log:	Fix uninitialized variable in _testcapi. Should be backported to
	CPython...

diff --git a/lib_pypy/_testcapimodule.c b/lib_pypy/_testcapimodule.c
--- a/lib_pypy/_testcapimodule.c
+++ b/lib_pypy/_testcapimodule.c
@@ -1479,7 +1479,7 @@
 unicode_transformdecimaltoascii(PyObject *self, PyObject *args)
 {
     Py_UNICODE *unicode;
-    Py_ssize_t length;
+    Py_ssize_t length = 0;
     if (!PyArg_ParseTuple(args, "u#|s", &unicode, &length))
         return NULL;
     return PyUnicode_TransformDecimalToASCII(unicode, length);


More information about the pypy-commit mailing list