mirror of
https://github.com/boostorg/python.git
synced 2026-01-26 06:42:27 +00:00
Initial attempt to fix problems
[SVN r10158]
This commit is contained in:
@@ -38,7 +38,7 @@ struct callback
|
||||
%{ template <%(class A%n%:, %)>
|
||||
%} static R call_method(PyObject* self, const char* name%(, const A%n& a%n%))
|
||||
{%(
|
||||
ref p%n(to_python(a%n));%)
|
||||
ref p%n(to_python(search_namespace, a%n));%)
|
||||
ref result(PyEval_CallMethod(self, const_cast<char*>(name),
|
||||
const_cast<char*>("(%(O%))")%(,
|
||||
p%n.get()%)));
|
||||
@@ -49,7 +49,7 @@ struct callback
|
||||
%{ template <%(class A%n%:, %)>
|
||||
%} static R call(PyObject* self%(, const A%n& a%n%))
|
||||
{%(
|
||||
ref p%n(to_python(a%n));%)
|
||||
ref p%n(to_python(search_namespace, a%n));%)
|
||||
ref result(PyEval_CallFunction(self, const_cast<char*>("(%(O%))")%(,
|
||||
p%n.get()%)));
|
||||
detail::callback_adjust_refcount(result.get(), type<R>());
|
||||
@@ -70,7 +70,7 @@ struct callback<void>
|
||||
%{ template <%(class A%n%:, %)>
|
||||
%} static void call_method(PyObject* self, const char* name%(, const A%n& a%n%))
|
||||
{%(
|
||||
ref p%n(to_python(a%n));%)
|
||||
ref p%n(to_python(search_namespace, a%n));%)
|
||||
ref result(PyEval_CallMethod(self, const_cast<char*>(name),
|
||||
const_cast<char*>("(%(O%))")%(,
|
||||
p%n.get()%)));
|
||||
@@ -79,7 +79,7 @@ struct callback<void>
|
||||
%{ template <%(class A%n%:, %)>
|
||||
%} static void call(PyObject* self%(, const A%n& a%n%))
|
||||
{%(
|
||||
ref p%n(to_python(a%n));%)
|
||||
ref p%n(to_python(search_namespace, a%n));%)
|
||||
ref result(PyEval_CallFunction(self, const_cast<char*>("(%(O%))")%(,
|
||||
p%n.get()%)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user