From e254974d01df2e02f2f2a755aecb7b0053246ef7 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Tue, 25 Aug 2009 00:12:01 -0300 Subject: fixed list conversions on test bindings to use PySequence functions instead of erroneous PyTuple functions --- tests/samplebinding/list_conversions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/samplebinding/list_conversions.h b/tests/samplebinding/list_conversions.h index f512f98ad..a72075e05 100644 --- a/tests/samplebinding/list_conversions.h +++ b/tests/samplebinding/list_conversions.h @@ -17,8 +17,8 @@ struct Converter_std_list static StdList toCpp(PyObject* pyobj) { StdList result; - for (int i = 0; i < PyTuple_GET_SIZE(pyobj); i++) { - PyObject* pyItem = PyTuple_GET_ITEM(pyobj, i); + for (int i = 0; i < PySequence_Size(pyobj); i++) { + PyObject* pyItem = PySequence_GetItem(pyobj, i); result.push_back(Converter::toCpp(pyItem)); } return result; -- cgit v1.2.3