MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / getInternalBindingPyFn

Function getInternalBindingPyFn

src/internalBinding.cc:57–64  ·  view source on GitHub ↗

* @brief Convert the `internalBinding(namespace)` function to a Python function */

Source from the content-addressed store, hash-verified

55 * @brief Convert the `internalBinding(namespace)` function to a Python function
56 */
57PyObject *getInternalBindingPyFn(JSContext *cx) {
58 // Create the JS `internalBinding` function
59 JSObject *jsFn = (JSObject *)createInternalBinding(cx);
60
61 // Convert to a Python function
62 JS::RootedValue jsFnVal(cx, JS::ObjectValue(*jsFn));
63 return pyTypeFactory(cx, jsFnVal);
64}

Callers 1

PyInit_pythonmonkeyFunction · 0.85

Calls 2

createInternalBindingFunction · 0.85
pyTypeFactoryFunction · 0.85

Tested by

no test coverage detected