PythonMonkey   v0.3.1 (dev)
Loading...
Searching...
No Matches
pyTypeFactory.hh
Go to the documentation of this file.
1
12#ifndef PythonMonkey_PyTypeFactory_
13#define PythonMonkey_PyTypeFactory_
14
15#include "PyType.hh"
16
17#include <jsapi.h>
18
19#include <Python.h>
20
28PyType *pyTypeFactory(PyObject *object);
29
38PyType *pyTypeFactory(JSContext *cx, JS::Rooted<JSObject *> *thisObj, JS::Rooted<JS::Value> *rval);
43PyType *pyTypeFactorySafe(JSContext *cx, JS::Rooted<JSObject *> *thisObj, JS::Rooted<JS::Value> *rval);
44
52PyObject *callJSFunc(PyObject *JSFuncAddress, PyObject *args);
53
54#endif
Struct representing python types.
PyObject * callJSFunc(PyObject *JSFuncAddress, PyObject *args)
Helper function for pyTypeFactory to create FuncTypes through PyCFunction_New.
Definition pyTypeFactory.cc:197
PyType * pyTypeFactory(PyObject *object)
Function that takes an arbitrary PyObject* and returns a corresponding PyType* object.
Definition pyTypeFactory.cc:45
PyType * pyTypeFactorySafe(JSContext *cx, JS::Rooted< JSObject * > *thisObj, JS::Rooted< JS::Value > *rval)
same to pyTypeFactory, but it's guaranteed that no error would be set on the Python error stack,...
Definition pyTypeFactory.cc:186
Abstract struct that serves as a base for the different type relations in C++/Python.
Definition PyType.hh:22