PythonMonkey v1.1.1 (dev)
|
This file defines the pythonmonkey module, along with its various functions. More...
#include "include/modules/pythonmonkey/pythonmonkey.hh"
#include "include/setSpiderMonkeyException.hh"
#include "include/JSFunctionProxy.hh"
#include "include/JSMethodProxy.hh"
#include "include/JSArrayIterProxy.hh"
#include "include/JSArrayProxy.hh"
#include "include/JSObjectIterProxy.hh"
#include "include/JSObjectKeysProxy.hh"
#include "include/JSObjectValuesProxy.hh"
#include "include/JSObjectItemsProxy.hh"
#include "include/JSObjectProxy.hh"
#include "include/JSStringProxy.hh"
#include "include/pyTypeFactory.hh"
#include "include/PyEventLoop.hh"
#include "include/internalBinding.hh"
#include <jsapi.h>
#include <jsfriendapi.h>
#include <js/friend/ErrorMessages.h>
#include <js/friend/DOMProxy.h>
#include <js/CompilationAndEvaluation.h>
#include <js/ContextOptions.h>
#include <js/Class.h>
#include <js/Date.h>
#include <js/Initialization.h>
#include <js/Object.h>
#include <js/Proxy.h>
#include <js/SourceText.h>
#include <js/Symbol.h>
#include <Python.h>
#include <datetime.h>
#include "include/pyshim.hh"
#include <unordered_map>
#include <vector>
#include <cassert>
Classes | |
struct | NullObject |
Functions | |
void | updateCharBufferPointers () |
During a GC, string buffers may have moved, so we need to re-point our JSStringProxies The char buffer pointer obtained by previous JS::Get{Latin1,TwoByte}LinearStringChars calls remains valid only as long as no GC occurs. | |
void | pythonmonkeyGCCallback (JSContext *cx, JSGCStatus status, JS::GCReason reason, void *data) |
void | nurseryCollectionCallback (JSContext *cx, JS::GCNurseryProgress progress, JS::GCReason reason, void *data) |
bool | functionRegistryCallback (JSContext *cx, unsigned int argc, JS::Value *vp) |
PyObject * | getPythonMonkeyNull () |
PyObject * | getPythonMonkeyBigInt () |
PyMODINIT_FUNC | PyInit_pythonmonkey (void) |
Initialization function for the module. Starts the JSContext, creates the global object, and sets cleanup functions. | |
Variables | |
JS::PersistentRootedObject | jsFunctionRegistry |
PyTypeObject | JSObjectProxyType |
Struct for the JSObjectProxyType, used by all JSObjectProxy objects. | |
PyTypeObject | JSStringProxyType |
Struct for the JSStringProxyType, used by all JSStringProxy objects. | |
PyTypeObject | JSFunctionProxyType |
Struct for the JSFunctionProxyType, used by all JSFunctionProxy objects. | |
PyTypeObject | JSMethodProxyType |
Struct for the JSMethodProxyType, used by all JSMethodProxy objects. | |
PyTypeObject | JSArrayProxyType |
Struct for the JSArrayProxyType, used by all JSArrayProxy objects. | |
PyTypeObject | JSArrayIterProxyType |
Struct for the JSArrayProxyType, used by all JSArrayProxy objects. | |
PyTypeObject | JSObjectIterProxyType |
Struct for the JSArrayProxyType, used by all JSArrayProxy objects. | |
PyTypeObject | JSObjectKeysProxyType |
Struct for the JSObjectKeysProxyType, used by all JSObjectKeysProxy objects. | |
PyTypeObject | JSObjectValuesProxyType |
Struct for the JSObjectValuesProxyType, used by all JSObjectValuesProxy objects. | |
PyTypeObject | JSObjectItemsProxyType |
Struct for the JSObjectItemsProxyType, used by all JSObjectItemsProxy objects. | |
PyMethodDef | PythonMonkeyMethods [] |
Array of method definitions for the pythonmonkey module. | |
struct PyModuleDef | pythonmonkey |
Module definition for the pythonmonkey module. | |
PyObject * | SpiderMonkeyError = NULL |
PyObject for spidermonkey error type. | |
This file defines the pythonmonkey module, along with its various functions.
bool functionRegistryCallback | ( | JSContext * | cx, |
unsigned int | argc, | ||
JS::Value * | vp | ||
) |
PyObject * getPythonMonkeyBigInt | ( | ) |
PyObject * getPythonMonkeyNull | ( | ) |
void nurseryCollectionCallback | ( | JSContext * | cx, |
JS::GCNurseryProgress | progress, | ||
JS::GCReason | reason, | ||
void * | data | ||
) |
PyMODINIT_FUNC PyInit_pythonmonkey | ( | void | ) |
Initialization function for the module. Starts the JSContext, creates the global object, and sets cleanup functions.
void pythonmonkeyGCCallback | ( | JSContext * | cx, |
JSGCStatus | status, | ||
JS::GCReason | reason, | ||
void * | data | ||
) |
void updateCharBufferPointers | ( | ) |
During a GC, string buffers may have moved, so we need to re-point our JSStringProxies The char buffer pointer obtained by previous JS::Get{Latin1,TwoByte}LinearStringChars
calls remains valid only as long as no GC occurs.
PyTypeObject JSArrayIterProxyType |
Struct for the JSArrayProxyType, used by all JSArrayProxy objects.
PyTypeObject JSArrayProxyType |
Struct for the JSArrayProxyType, used by all JSArrayProxy objects.
PyTypeObject JSFunctionProxyType |
Struct for the JSFunctionProxyType, used by all JSFunctionProxy objects.
JS::PersistentRootedObject jsFunctionRegistry |
// this is a FinalizationRegistry for JSFunctions that depend on Python functions. It is used to handle reference counts when the JSFunction is finalized
PyTypeObject JSMethodProxyType |
Struct for the JSMethodProxyType, used by all JSMethodProxy objects.
PyTypeObject JSObjectItemsProxyType |
Struct for the JSObjectItemsProxyType, used by all JSObjectItemsProxy objects.
PyTypeObject JSObjectIterProxyType |
Struct for the JSArrayProxyType, used by all JSArrayProxy objects.
PyTypeObject JSObjectKeysProxyType |
Struct for the JSObjectKeysProxyType, used by all JSObjectKeysProxy objects.
PyTypeObject JSObjectProxyType |
Struct for the JSObjectProxyType, used by all JSObjectProxy objects.
PyTypeObject JSObjectValuesProxyType |
Struct for the JSObjectValuesProxyType, used by all JSObjectValuesProxy objects.
PyTypeObject JSStringProxyType |
Struct for the JSStringProxyType, used by all JSStringProxy objects.
struct PyModuleDef pythonmonkey |
Module definition for the pythonmonkey module.
PyMethodDef PythonMonkeyMethods[] |
Array of method definitions for the pythonmonkey module.
PyObject* SpiderMonkeyError = NULL |
PyObject for spidermonkey error type.