PythonMonkey   v1.0.1 (dev)
Loading...
Searching...
No Matches
JSFunctionProxy.hh
Go to the documentation of this file.
1
11#ifndef PythonMonkey_JSFunctionProxy_
12#define PythonMonkey_JSFunctionProxy_
13
14#include <jsapi.h>
15
16#include <Python.h>
21typedef struct {
22 PyObject_HEAD
23 JS::PersistentRootedObject *jsFunc;
25
31public:
38
47 static PyObject *JSFunctionProxy_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
48
57 static PyObject *JSFunctionProxy_call(PyObject *self, PyObject *args, PyObject *kwargs);
58};
59
63extern PyTypeObject JSFunctionProxyType;
64
65#endif
PyTypeObject JSFunctionProxyType
Struct for the JSFunctionProxyType, used by all JSFunctionProxy objects.
Definition pythonmonkey.cc:168
This struct is a bundle of methods used by the JSFunctionProxy type.
Definition JSFunctionProxy.hh:30
static PyObject * JSFunctionProxy_call(PyObject *self, PyObject *args, PyObject *kwargs)
Call method (.tp_call), called when the JSFunctionProxy is called.
Definition JSFunctionProxy.cc:35
static PyObject * JSFunctionProxy_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
New method (.tp_new), creates a new instance of the JSFunctionProxy type, exposed as the new() method...
Definition JSFunctionProxy.cc:27
static void JSFunctionProxy_dealloc(JSFunctionProxy *self)
Deallocation method (.tp_dealloc), removes the reference to the underlying JSFunction before freeing ...
Definition JSFunctionProxy.cc:22
The typedef for the backing store that will be used by JSFunctionProxy objects. All it contains is a ...
Definition JSFunctionProxy.hh:21
PyObject_HEAD JS::PersistentRootedObject * jsFunc
Definition JSFunctionProxy.hh:23