1#ifndef CPYCPPYY_CPPOVERLOAD_H
2#define CPYCPPYY_CPPOVERLOAD_H
21 int nargs = (
int)PyTuple_GET_SIZE(args);
22 for (
int i = 0; i < nargs; ++i) {
25 PyObject* pyobj = PyTuple_GET_ITEM(args, i);
26 hash += (uint64_t)
Py_TYPE(pyobj);
27 hash += (uint64_t)(pyobj->ob_refcnt == 1 ? 1 : 0);
28 hash += (hash << 10); hash ^= (hash >> 6);
31 hash += (hash << 3); hash ^= (hash >> 11); hash += (hash << 15);
58 void Set(
const std::string&
name, std::vector<PyCallable*>& methods);
92 const std::string&
name, std::vector<PyCallable*>& methods)
103 std::vector<PyCallable*> p;
void MergeOverload(CPPOverload *meth)
void AdoptMethod(PyCallable *pc)
MethodInfo_t * fMethodInfo
PyObject_HEAD CPPInstance * fSelf
const std::string & GetName() const
std::vector< PyCallable * > Methods_t
std::vector< std::pair< uint64_t, PyCallable * > > DispatchMap_t
void Set(const std::string &name, std::vector< PyCallable * > &methods)
Set of helper functions that are invoked from the pythonizors, on the Python side.
CPPOverload * CPPOverload_New(const std::string &name, std::vector< PyCallable * > &methods)
bool CPPOverload_Check(T *object)
PyTypeObject CPPOverload_Type
uint64_t HashSignature(PyObject *args)
bool CPPOverload_CheckExact(T *object)
CPPOverload::DispatchMap_t fDispatchMap
MethodInfo_t(const MethodInfo_t &)=delete
MethodInfo_t & operator=(const MethodInfo_t &)=delete
CPPOverload::Methods_t fMethods