2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-19 16:32:16 +00:00

Stop using deprecated API calls (python-3.9) #319

This commit is contained in:
Pat Riehecky
2020-10-14 13:54:24 -05:00
committed by Stefan Seefeld
parent b4fbf1840b
commit 944fa075b3
3 changed files with 5 additions and 5 deletions

View File

@@ -60,7 +60,7 @@ call(PyObject* callable
)
{
PyObject* const result =
PyEval_CallFunction(
PyObject_CallFunction(
callable
, const_cast<char*>("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")")
BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET, nil)
@@ -69,7 +69,7 @@ call(PyObject* callable
// This conversion *must not* be done in the same expression as
// the call, because, in the special case where the result is a
// reference a Python object which was created by converting a C++
// argument for passing to PyEval_CallFunction, its reference
// argument for passing to PyObject_CallFunction, its reference
// count will be 2 until the end of the full expression containing
// the conversion, and that interferes with dangling
// pointer/reference detection.

View File

@@ -69,7 +69,7 @@ call_method(PyObject* self, char const* name
// This conversion *must not* be done in the same expression as
// the call, because, in the special case where the result is a
// reference a Python object which was created by converting a C++
// argument for passing to PyEval_CallFunction, its reference
// argument for passing to PyObject_CallFunction, its reference
// count will be 2 until the end of the full expression containing
// the conversion, and that interferes with dangling
// pointer/reference detection.

View File

@@ -97,7 +97,7 @@ class override : public object
operator()() const
{
detail::method_result x(
PyEval_CallFunction(
PyObject_CallFunction(
this->ptr()
, const_cast<char*>("()")
));
@@ -132,7 +132,7 @@ detail::method_result
operator()( BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a) ) const
{
detail::method_result x(
PyEval_CallFunction(
PyObject_CallFunction(
this->ptr()
, const_cast<char*>("(" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, "O") ")")
BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_fast_arg_to_python_get, nil)