Internal data structure which holds metadata about a bound function (signature, overloads, etc.) More...
#include <attr.h>
Public Member Functions | |
function_record () | |
Public Attributes | |
std::vector< argument_record > | args |
List of registered keyword arguments. More... | |
void * | data [3] = { } |
Storage for the wrapped function pointer and captured data, if any. More... | |
PyMethodDef * | def = nullptr |
Python method object. More... | |
char * | doc = nullptr |
void(* | free_data )(function_record *ptr) = nullptr |
Pointer to custom destructor for 'data' (if needed) More... | |
bool | has_args: 1 |
True if the function has a '*args' argument. More... | |
bool | has_kw_only_args: 1 |
True once a 'py::kw_only' is encountered (any following args are keyword-only) More... | |
bool | has_kwargs: 1 |
True if the function has a '**kwargs' argument. More... | |
handle(* | impl )(function_call &) = nullptr |
Pointer to lambda function which converts arguments and performs the actual call. More... | |
bool | is_constructor: 1 |
True if name == 'init'. More... | |
bool | is_method: 1 |
True if this is a method. More... | |
bool | is_new_style_constructor: 1 |
True if this is a new-style __init__ defined in detail/init.h More... | |
bool | is_operator: 1 |
True if this is an operator (add), etc. More... | |
bool | is_stateless: 1 |
True if this is a stateless function pointer. More... | |
char * | name = nullptr |
Function name. More... | |
std::uint16_t | nargs |
Number of arguments (including py::args and/or py::kwargs, if present) More... | |
std::uint16_t | nargs_kw_only = 0 |
Number of trailing arguments (counted in nargs ) that are keyword-only. More... | |
std::uint16_t | nargs_pos_only = 0 |
Number of leading arguments (counted in nargs ) that are positional-only. More... | |
function_record * | next = nullptr |
Pointer to next overload. More... | |
return_value_policy | policy = return_value_policy::automatic |
Return value policy associated with this function. More... | |
handle | scope |
Python handle to the parent scope (a class or a module) More... | |
handle | sibling |
Python handle to the sibling function representing an overload chain. More... | |
char * | signature = nullptr |
Human-readable version of the function signature. More... | |
Internal data structure which holds metadata about a bound function (signature, overloads, etc.)
std::vector<argument_record> function_record::args |
void* function_record::data[3] = { } |
PyMethodDef* function_record::def = nullptr |
void(* function_record::free_data) (function_record *ptr) = nullptr |
bool function_record::has_args |
bool function_record::has_kw_only_args |
bool function_record::has_kwargs |
handle(* function_record::impl) (function_call &) = nullptr |
bool function_record::is_new_style_constructor |
bool function_record::is_operator |
bool function_record::is_stateless |
std::uint16_t function_record::nargs |
std::uint16_t function_record::nargs_kw_only = 0 |
std::uint16_t function_record::nargs_pos_only = 0 |
function_record* function_record::next = nullptr |
return_value_policy function_record::policy = return_value_policy::automatic |
handle function_record::scope |
handle function_record::sibling |
char* function_record::signature = nullptr |