PythonMonkey   v1.1.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:87
Definition __init__.py:1
PyMethodDef PythonMonkeyMethods[]
Array of method definitions for the pythonmonkey module.
Definition pythonmonkey.cc:538
JS::PersistentRootedObject jsFunctionRegistry
Definition pythonmonkey.cc:50
PyMODINIT_FUNC PyInit_pythonmonkey(void)
Initialization function for the module. Starts the JSContext, creates the global object,...
Definition pythonmonkey.cc:558
PyObject * getPythonMonkeyNull()
Definition pythonmonkey.cc:101
PyObject * SpiderMonkeyError
PyObject for spidermonkey error type.
Definition pythonmonkey.cc:556
PyObject * getPythonMonkeyBigInt()
Definition pythonmonkey.cc:108
JSContext * GLOBAL_CX
Definition JSObjectProxy.cc:34