From 0925d9265f1c34e7a7f8e018e25935aa1dcf7504 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 18 Feb 2013 11:35:20 +0000 Subject: [PATCH] fix oops --- dtool/src/interrogatedb/py_panda.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index da210dda5c..9025ca1e3b 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -679,13 +679,14 @@ PyObject *make_list_for_item(PyObject *self, const char *num_name, return NULL; } + Py_ssize_t num_elements; #if PY_MAJOR_VERSION >= 3 - Py_ssize_t num_elements = PyLong_AsSsize_t(num_result); + num_elements = PyLong_AsSsize_t(num_result); #else if (PyLong_Check(num_result)) { - Py_ssize_t num_elements = PyLong_AsSsize_t(num_result); + num_elements = PyLong_AsSsize_t(num_result); } else { - Py_ssize_t num_elements = PyInt_AsSsize_t(num_result); + num_elements = PyInt_AsSsize_t(num_result); } #endif Py_DECREF(num_result);