diff --git a/include/boost/python/callback.hpp b/include/boost/python/callback.hpp index b9e850c6..7240b5b7 100644 --- a/include/boost/python/callback.hpp +++ b/include/boost/python/callback.hpp @@ -46,7 +46,7 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1) { - ref p1(to_python(search_namespace, a1)); + ref p1(to_python(a1)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(O)"), p1.get())); @@ -57,7 +57,7 @@ struct callback template static R call(PyObject* self, const A1& a1) { - ref p1(to_python(search_namespace, a1)); + ref p1(to_python(a1)); ref result(PyEval_CallFunction(self, const_cast("(O)"), p1.get())); detail::callback_adjust_refcount(result.get(), type()); @@ -67,8 +67,8 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1, const A2& a2) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OO)"), p1.get(), @@ -80,8 +80,8 @@ struct callback template static R call(PyObject* self, const A1& a1, const A2& a2) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); ref result(PyEval_CallFunction(self, const_cast("(OO)"), p1.get(), p2.get())); @@ -92,9 +92,9 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOO)"), p1.get(), @@ -107,9 +107,9 @@ struct callback template static R call(PyObject* self, const A1& a1, const A2& a2, const A3& a3) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); ref result(PyEval_CallFunction(self, const_cast("(OOO)"), p1.get(), p2.get(), @@ -121,10 +121,10 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOO)"), p1.get(), @@ -138,10 +138,10 @@ struct callback template static R call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); ref result(PyEval_CallFunction(self, const_cast("(OOOO)"), p1.get(), p2.get(), @@ -154,11 +154,11 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOO)"), p1.get(), @@ -173,11 +173,11 @@ struct callback template static R call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); ref result(PyEval_CallFunction(self, const_cast("(OOOOO)"), p1.get(), p2.get(), @@ -191,12 +191,12 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOO)"), p1.get(), @@ -212,12 +212,12 @@ struct callback template static R call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOO)"), p1.get(), p2.get(), @@ -232,13 +232,13 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOOO)"), p1.get(), @@ -255,13 +255,13 @@ struct callback template static R call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOOO)"), p1.get(), p2.get(), @@ -277,14 +277,14 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOOOO)"), p1.get(), @@ -302,14 +302,14 @@ struct callback template static R call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOOOO)"), p1.get(), p2.get(), @@ -326,15 +326,15 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); - ref p9(to_python(search_namespace, a9)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); + ref p9(to_python(a9)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOOOOO)"), p1.get(), @@ -353,15 +353,15 @@ struct callback template static R call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); - ref p9(to_python(search_namespace, a9)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); + ref p9(to_python(a9)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOOOOO)"), p1.get(), p2.get(), @@ -379,16 +379,16 @@ struct callback template static R call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); - ref p9(to_python(search_namespace, a9)); - ref p10(to_python(search_namespace, a10)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); + ref p9(to_python(a9)); + ref p10(to_python(a10)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOOOOOO)"), p1.get(), @@ -408,16 +408,16 @@ struct callback template static R call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); - ref p9(to_python(search_namespace, a9)); - ref p10(to_python(search_namespace, a10)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); + ref p9(to_python(a9)); + ref p10(to_python(a10)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOOOOOO)"), p1.get(), p2.get(), @@ -455,7 +455,7 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1) { - ref p1(to_python(search_namespace, a1)); + ref p1(to_python(a1)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(O)"), p1.get())); @@ -464,7 +464,7 @@ struct callback template static void call(PyObject* self, const A1& a1) { - ref p1(to_python(search_namespace, a1)); + ref p1(to_python(a1)); ref result(PyEval_CallFunction(self, const_cast("(O)"), p1.get())); } @@ -472,8 +472,8 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1, const A2& a2) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OO)"), p1.get(), @@ -483,8 +483,8 @@ struct callback template static void call(PyObject* self, const A1& a1, const A2& a2) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); ref result(PyEval_CallFunction(self, const_cast("(OO)"), p1.get(), p2.get())); @@ -493,9 +493,9 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOO)"), p1.get(), @@ -506,9 +506,9 @@ struct callback template static void call(PyObject* self, const A1& a1, const A2& a2, const A3& a3) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); ref result(PyEval_CallFunction(self, const_cast("(OOO)"), p1.get(), p2.get(), @@ -518,10 +518,10 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOO)"), p1.get(), @@ -533,10 +533,10 @@ struct callback template static void call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); ref result(PyEval_CallFunction(self, const_cast("(OOOO)"), p1.get(), p2.get(), @@ -547,11 +547,11 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOO)"), p1.get(), @@ -564,11 +564,11 @@ struct callback template static void call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); ref result(PyEval_CallFunction(self, const_cast("(OOOOO)"), p1.get(), p2.get(), @@ -580,12 +580,12 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOO)"), p1.get(), @@ -599,12 +599,12 @@ struct callback template static void call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOO)"), p1.get(), p2.get(), @@ -617,13 +617,13 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOOO)"), p1.get(), @@ -638,13 +638,13 @@ struct callback template static void call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOOO)"), p1.get(), p2.get(), @@ -658,14 +658,14 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOOOO)"), p1.get(), @@ -681,14 +681,14 @@ struct callback template static void call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOOOO)"), p1.get(), p2.get(), @@ -703,15 +703,15 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); - ref p9(to_python(search_namespace, a9)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); + ref p9(to_python(a9)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOOOOO)"), p1.get(), @@ -728,15 +728,15 @@ struct callback template static void call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); - ref p9(to_python(search_namespace, a9)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); + ref p9(to_python(a9)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOOOOO)"), p1.get(), p2.get(), @@ -752,16 +752,16 @@ struct callback template static void call_method(PyObject* self, const char* name, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); - ref p9(to_python(search_namespace, a9)); - ref p10(to_python(search_namespace, a10)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); + ref p9(to_python(a9)); + ref p10(to_python(a10)); ref result(PyEval_CallMethod(self, const_cast(name), const_cast("(OOOOOOOOOO)"), p1.get(), @@ -779,16 +779,16 @@ struct callback template static void call(PyObject* self, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10) { - ref p1(to_python(search_namespace, a1)); - ref p2(to_python(search_namespace, a2)); - ref p3(to_python(search_namespace, a3)); - ref p4(to_python(search_namespace, a4)); - ref p5(to_python(search_namespace, a5)); - ref p6(to_python(search_namespace, a6)); - ref p7(to_python(search_namespace, a7)); - ref p8(to_python(search_namespace, a8)); - ref p9(to_python(search_namespace, a9)); - ref p10(to_python(search_namespace, a10)); + ref p1(to_python(a1)); + ref p2(to_python(a2)); + ref p3(to_python(a3)); + ref p4(to_python(a4)); + ref p5(to_python(a5)); + ref p6(to_python(a6)); + ref p7(to_python(a7)); + ref p8(to_python(a8)); + ref p9(to_python(a9)); + ref p10(to_python(a10)); ref result(PyEval_CallFunction(self, const_cast("(OOOOOOOOOO)"), p1.get(), p2.get(), diff --git a/include/boost/python/caller.hpp b/include/boost/python/caller.hpp index 86820233..35b2d618 100644 --- a/include/boost/python/caller.hpp +++ b/include/boost/python/caller.hpp @@ -30,7 +30,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("O"), &self)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)()); + return to_python((target.*pmf)()); } template @@ -40,7 +40,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OO"), &self, &a1)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()))); + return to_python((target.*pmf)(from_python(a1, type()))); } template @@ -51,7 +51,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOO"), &self, &a1, &a2)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()))); } @@ -64,7 +64,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOO"), &self, &a1, &a2, &a3)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()))); } @@ -79,7 +79,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOO"), &self, &a1, &a2, &a3, &a4)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()))); @@ -96,7 +96,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOO"), &self, &a1, &a2, &a3, &a4, &a5)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -115,7 +115,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -136,7 +136,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6, &a7)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -159,7 +159,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -184,7 +184,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -211,7 +211,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9, &a10)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -230,7 +230,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("O"), &self)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)()); + return to_python((target.*pmf)()); } template @@ -240,7 +240,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OO"), &self, &a1)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()))); + return to_python((target.*pmf)(from_python(a1, type()))); } template @@ -251,7 +251,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOO"), &self, &a1, &a2)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()))); } @@ -264,7 +264,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOO"), &self, &a1, &a2, &a3)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()))); } @@ -279,7 +279,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOO"), &self, &a1, &a2, &a3, &a4)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()))); @@ -296,7 +296,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOO"), &self, &a1, &a2, &a3, &a4, &a5)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -315,7 +315,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -336,7 +336,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6, &a7)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -359,7 +359,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -384,7 +384,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -411,7 +411,7 @@ struct caller if (!PyArg_ParseTuple(args, const_cast("OOOOOOOOOOO"), &self, &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9, &a10)) return 0; T& target = from_python(self, type()); - return to_python(search_namespace, (target.*pmf)(from_python(a1, type()), + return to_python((target.*pmf)(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -427,7 +427,7 @@ struct caller static PyObject* call(R (*f)(), PyObject* args, PyObject* /* keywords */ ) { if (!PyArg_ParseTuple(args, const_cast(""))) return 0; - return to_python(search_namespace, f()); + return to_python(f()); } template @@ -435,7 +435,7 @@ struct caller PyObject* a1; if (!PyArg_ParseTuple(args, const_cast("O"), &a1)) return 0; - return to_python(search_namespace, f(from_python(a1, type()))); + return to_python(f(from_python(a1, type()))); } template @@ -444,7 +444,7 @@ struct caller PyObject* a2; if (!PyArg_ParseTuple(args, const_cast("OO"), &a1, &a2)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()))); } @@ -455,7 +455,7 @@ struct caller PyObject* a3; if (!PyArg_ParseTuple(args, const_cast("OOO"), &a1, &a2, &a3)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()))); } @@ -468,7 +468,7 @@ struct caller PyObject* a4; if (!PyArg_ParseTuple(args, const_cast("OOOO"), &a1, &a2, &a3, &a4)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()))); @@ -483,7 +483,7 @@ struct caller PyObject* a5; if (!PyArg_ParseTuple(args, const_cast("OOOOO"), &a1, &a2, &a3, &a4, &a5)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -500,7 +500,7 @@ struct caller PyObject* a6; if (!PyArg_ParseTuple(args, const_cast("OOOOOO"), &a1, &a2, &a3, &a4, &a5, &a6)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -519,7 +519,7 @@ struct caller PyObject* a7; if (!PyArg_ParseTuple(args, const_cast("OOOOOOO"), &a1, &a2, &a3, &a4, &a5, &a6, &a7)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -540,7 +540,7 @@ struct caller PyObject* a8; if (!PyArg_ParseTuple(args, const_cast("OOOOOOOO"), &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -563,7 +563,7 @@ struct caller PyObject* a9; if (!PyArg_ParseTuple(args, const_cast("OOOOOOOOO"), &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -588,7 +588,7 @@ struct caller PyObject* a10; if (!PyArg_ParseTuple(args, const_cast("OOOOOOOOOO"), &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9, &a10)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()), @@ -615,7 +615,7 @@ struct caller PyObject* a11; if (!PyArg_ParseTuple(args, const_cast("OOOOOOOOOOO"), &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9, &a10, &a11)) return 0; - return to_python(search_namespace, f(from_python(a1, type()), + return to_python(f(from_python(a1, type()), from_python(a2, type()), from_python(a3, type()), from_python(a4, type()),