Skip to content

Commit 944fa07

Browse files
jcpunkstefanseefeld
authored andcommitted
Stop using deprecated API calls (python-3.9) #319
1 parent b4fbf18 commit 944fa07

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

include/boost/python/call.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ call(PyObject* callable
6060
)
6161
{
6262
PyObject* const result =
63-
PyEval_CallFunction(
63+
PyObject_CallFunction(
6464
callable
6565
, const_cast<char*>("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")")
6666
BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET, nil)
@@ -69,7 +69,7 @@ call(PyObject* callable
6969
// This conversion *must not* be done in the same expression as
7070
// the call, because, in the special case where the result is a
7171
// reference a Python object which was created by converting a C++
72-
// argument for passing to PyEval_CallFunction, its reference
72+
// argument for passing to PyObject_CallFunction, its reference
7373
// count will be 2 until the end of the full expression containing
7474
// the conversion, and that interferes with dangling
7575
// pointer/reference detection.

include/boost/python/call_method.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ call_method(PyObject* self, char const* name
6969
// This conversion *must not* be done in the same expression as
7070
// the call, because, in the special case where the result is a
7171
// reference a Python object which was created by converting a C++
72-
// argument for passing to PyEval_CallFunction, its reference
72+
// argument for passing to PyObject_CallFunction, its reference
7373
// count will be 2 until the end of the full expression containing
7474
// the conversion, and that interferes with dangling
7575
// pointer/reference detection.

include/boost/python/override.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class override : public object
9797
operator()() const
9898
{
9999
detail::method_result x(
100-
PyEval_CallFunction(
100+
PyObject_CallFunction(
101101
this->ptr()
102102
, const_cast<char*>("()")
103103
));
@@ -132,7 +132,7 @@ detail::method_result
132132
operator()( BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a) ) const
133133
{
134134
detail::method_result x(
135-
PyEval_CallFunction(
135+
PyObject_CallFunction(
136136
this->ptr()
137137
, const_cast<char*>("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")")
138138
BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_fast_arg_to_python_get, nil)

0 commit comments

Comments
 (0)