PythonMonkey   v0.3.1 (dev)
Loading...
Searching...
No Matches
jsTypeFactory.hh
Go to the documentation of this file.
1
12#ifndef PythonMonkey_JsTypeFactory_
13#define PythonMonkey_JsTypeFactory_
14
15#include "include/PyType.hh"
16
17#include <jsapi.h>
18
19
21
30size_t UCS4ToUTF16(const uint32_t *chars, size_t length, uint16_t *outStr);
31
39JS::Value jsTypeFactory(JSContext *cx, PyObject *object);
44JS::Value jsTypeFactorySafe(JSContext *cx, PyObject *object);
45
55bool callPyFunc(JSContext *cx, unsigned int argc, JS::Value *vp);
56#endif
Struct representing python types.
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 ca...
Definition jsTypeFactory.cc:239
size_t UCS4ToUTF16(const uint32_t *chars, size_t length, uint16_t *outStr)
Function that makes a UTF16-encoded copy of a UCS4 string.
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,...
Definition jsTypeFactory.cc:208
JS::Value jsTypeFactory(JSContext *cx, PyObject *object)
Function that takes a PyObject and returns a corresponding JS::Value, doing shared memory management ...
Definition jsTypeFactory.cc:72
Definition jsTypeFactory.cc:42