|
PythonMonkey v1.3.0 (dev)
|
#include "include/jsTypeFactory.hh"#include "include/modules/pythonmonkey/pythonmonkey.hh"#include "include/JSFunctionProxy.hh"#include "include/JSMethodProxy.hh"#include "include/JSObjectProxy.hh"#include "include/JSArrayProxy.hh"#include "include/PyDictProxyHandler.hh"#include "include/JSStringProxy.hh"#include "include/PyListProxyHandler.hh"#include "include/PyObjectProxyHandler.hh"#include "include/PyIterableProxyHandler.hh"#include "include/pyTypeFactory.hh"#include "include/IntType.hh"#include "include/PromiseType.hh"#include "include/DateType.hh"#include "include/ExceptionType.hh"#include "include/BufferType.hh"#include "include/setSpiderMonkeyException.hh"#include <jsapi.h>#include <jsfriendapi.h>#include <js/Equality.h>#include <js/Proxy.h>#include <js/Array.h>#include <Python.h>#include <datetime.h>#include "include/pyshim.hh"#include <unordered_map>Macros | |
| #define | HIGH_SURROGATE_START 0xD800 |
| #define | LOW_SURROGATE_START 0xDC00 |
| #define | LOW_SURROGATE_END 0xDFFF |
| #define | BMP_END 0x10000 |
Functions | |
| size_t | UCS4ToUTF16 (const uint32_t *chars, size_t length, uint16_t **outStr) |
| JS::Value | jsTypeFactory (JSContext *cx, PyObject *object) |
| Function that takes a PyObject and returns a corresponding JS::Value, doing shared memory management when necessary. | |
| JS::Value | jsTypeFactorySafe (JSContext *cx, PyObject *object) |
same to jsTypeFactory, but it's guaranteed that no error would be set on the Python error stack, instead return JS null on error, and output a warning in Python-land | |
| bool | setPyException (JSContext *cx) |
| bool | callPyFunc (JSContext *cx, unsigned int argc, JS::Value *vp) |
| Helper function for jsTypeFactory to create a JSFunction* through JS_NewFunction that knows how to call a python function. | |
Variables | |
| std::unordered_map< PyObject *, size_t > | externalStringObjToRefCountMap |
| PythonExternalString | PythonExternalStringCallbacks = {} |
| #define BMP_END 0x10000 |
| #define HIGH_SURROGATE_START 0xD800 |
| #define LOW_SURROGATE_END 0xDFFF |
| #define LOW_SURROGATE_START 0xDC00 |
| bool callPyFunc | ( | JSContext * | cx, |
| unsigned int | argc, | ||
| JS::Value * | vp | ||
| ) |
Helper function for jsTypeFactory to create a JSFunction* through JS_NewFunction that knows how to call a python function.
| cx | - Pointer to the JSContext |
| argc | - The number of arguments the JSFunction expects |
| vp | - The return value of the JSFunction |
| JS::Value jsTypeFactory | ( | JSContext * | cx, |
| PyObject * | object | ||
| ) |
Function that takes a PyObject and returns a corresponding JS::Value, doing shared memory management when necessary.
| cx | - Pointer to the JSContext |
| object | - Pointer to the PyObject who's type and value we wish to encapsulate |
| JS::Value jsTypeFactorySafe | ( | JSContext * | cx, |
| PyObject * | object | ||
| ) |
same to jsTypeFactory, but it's guaranteed that no error would be set on the Python error stack, instead return JS null on error, and output a warning in Python-land
| bool setPyException | ( | JSContext * | cx | ) |
| size_t UCS4ToUTF16 | ( | const uint32_t * | chars, |
| size_t | length, | ||
| uint16_t ** | outStr | ||
| ) |
| std::unordered_map<PyObject *, size_t> externalStringObjToRefCountMap |
| PythonExternalString PythonExternalStringCallbacks = {} |