diff options
author | Christian Heimes <christian@cheimes.de> | 2012-10-06 15:13:29 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2012-10-06 15:13:29 (GMT) |
commit | 6314d164c9ea6fb7ef52c0ccbaa335f4d3fab9cb (patch) | |
tree | 3d889f285799da081032d7887d8c1ae20a94d6a8 /Objects | |
parent | 2649105cddd1c971bf59b3c840467996064cbc4f (diff) | |
download | cpython-6314d164c9ea6fb7ef52c0ccbaa335f4d3fab9cb.zip cpython-6314d164c9ea6fb7ef52c0ccbaa335f4d3fab9cb.tar.gz cpython-6314d164c9ea6fb7ef52c0ccbaa335f4d3fab9cb.tar.bz2 |
move var declaration to top of block to fix compilation on Windows, fixes a7ec0a1b0f7c
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/abstract.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index b6fc478..eb3a766 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -78,8 +78,10 @@ _PyObject_HasLen(PyObject *o) { Py_ssize_t PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) { + PyObject *hint; + Py_ssize_t res; _Py_IDENTIFIER(__length_hint__); - Py_ssize_t res = PyObject_Length(o); + res = PyObject_Length(o); if (res < 0 && PyErr_Occurred()) { if (!PyErr_ExceptionMatches(PyExc_TypeError)) { return -1; @@ -89,7 +91,7 @@ PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) else { return res; } - PyObject *hint = _PyObject_LookupSpecial(o, &PyId___length_hint__); + hint = _PyObject_LookupSpecial(o, &PyId___length_hint__); if (hint == NULL) { if (PyErr_Occurred()) { return -1; |