summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-08-25 00:12:01 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-08-25 00:12:01 -0300
commite254974d01df2e02f2f2a755aecb7b0053246ef7 (patch)
tree64bb137c9521634d14faae4edebf423ef75769cb
parentc2fdf775230ea9b0d9a6b1af209cd0a99e2a848e (diff)
fixed list conversions on test bindings to use PySequence functions
instead of erroneous PyTuple functions
-rw-r--r--tests/samplebinding/list_conversions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/samplebinding/list_conversions.h b/tests/samplebinding/list_conversions.h
index f512f98a..a72075e0 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<typename StdList::value_type>::toCpp(pyItem));
}
return result;