All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PY_CallMethod.h File Reference
#include "PY_CPythonAPI.h"
#include "PY_AutoObject.h"
#include "PY_InterpreterAutoLock.h"
#include "PY_Python.h"
#include "PY_Result.h"
+ Include dependency graph for PY_CallMethod.h:

Go to the source code of this file.


template<typename... Args>
PY_Result PYcallMethodOnPythonObjectWithArgs (void *opaque_python_object, const char *method_name, PY_Result::Type desired_result_type, const char *format, Args &&...args)

Function Documentation

template<typename... Args>
PY_Result PYcallMethodOnPythonObjectWithArgs ( void opaque_python_object,
const char *  method_name,
PY_Result::Type  desired_result_type,
const char *  format,
Args &&...  args 

Given an (opaque) Python object, call one of its methods and return its result, converting to the desired type.

This is identical to PYcallMethodOnPythonObject in PY_Python.h except that it uses a template parameter pack to forward arguments to the function call.

NOTE: there is an issue with clang (pre-v11) that means you can not make any of the arguments have default values (see https://bugs.llvm.org/show_bug.cgi?id=23029#c3)

Definition at line 33 of file PY_CallMethod.h.