PythonMonkey   v0.9.1 (dev)
Loading...
Searching...
No Matches
pythonmonkey.hh
Go to the documentation of this file.
1
10#ifndef PythonMonkey_Module_PythonMonkey
11#define PythonMonkey_Module_PythonMonkey
12
13#include "include/JobQueue.hh"
14
15#include <jsapi.h>
16#include <js/CompilationAndEvaluation.h>
17#include <js/Initialization.h>
18
19#include <Python.h>
20
21
22extern JSContext *GLOBAL_CX;
23extern JS::PersistentRootedObject jsFunctionRegistry;
24static JS::Rooted<JSObject *> *global;
25static JSAutoRealm *autoRealm;
26static JobQueue *JOB_QUEUE;
28// Get handle on global object
29PyObject *getPythonMonkeyNull();
30PyObject *getPythonMonkeyBigInt();
31
36static void cleanup();
37
45static PyObject *collect(PyObject *self, PyObject *args);
46
54static PyObject *eval(PyObject *self, PyObject *args);
55
61PyMODINIT_FUNC PyInit_pythonmonkey(void);
62
67extern PyMethodDef PythonMonkeyMethods[];
68
73extern struct PyModuleDef pythonmonkey;
74
79extern PyObject *SpiderMonkeyError;
80#endif
Implements the ECMAScript Job Queue.
Implement the ECMAScript Job Queue: https://www.ecma-international.org/ecma-262/9....
Definition JobQueue.hh:24
eval
Definition require.py:85
Definition __init__.py:1
PyMethodDef PythonMonkeyMethods[]
Array of method definitions for the pythonmonkey module.
Definition pythonmonkey.cc:525
JS::PersistentRootedObject jsFunctionRegistry
Definition pythonmonkey.cc:49
PyMODINIT_FUNC PyInit_pythonmonkey(void)
Initialization function for the module. Starts the JSContext, creates the global object,...
Definition pythonmonkey.cc:545
PyObject * getPythonMonkeyNull()
Definition pythonmonkey.cc:100
PyObject * SpiderMonkeyError
PyObject for spidermonkey error type.
Definition pythonmonkey.cc:543
PyObject * getPythonMonkeyBigInt()
Definition pythonmonkey.cc:107
JSContext * GLOBAL_CX
Definition JSObjectProxy.cc:33