PythonMonkey   v1.0.1 (dev)
Loading...
Searching...
No Matches
internalBinding.cc File Reference

Create internal bindings to get C++-implemented functions in JS, (imported from NodeJS internal design decisions) See function declarations in python/pythonmonkey/builtin_modules/internal-binding.d.ts. More...

#include "include/internalBinding.hh"
#include "include/pyTypeFactory.hh"
#include <jsapi.h>
#include <js/String.h>
#include <Python.h>
Include dependency graph for internalBinding.cc:

Functions

JSObject * createInternalBindingsForNamespace (JSContext *cx, JSFunctionSpec *methodSpecs)
 
JSObject * getInternalBindingsByNamespace (JSContext *cx, JSLinearString *namespaceStr)
 
JSFunction * createInternalBinding (JSContext *cx)
 Create the JS internalBinding function.
 
PyObject * getInternalBindingPyFn (JSContext *cx)
 Convert the internalBinding(namespace) function to a Python function.
 

Detailed Description

Create internal bindings to get C++-implemented functions in JS, (imported from NodeJS internal design decisions) See function declarations in python/pythonmonkey/builtin_modules/internal-binding.d.ts.

Author
Tom Tang (xmade.nosp@m.r@di.nosp@m.strib.nosp@m.utiv.nosp@m.e.net.nosp@m.work)

Function Documentation

◆ createInternalBinding()

JSFunction * createInternalBinding ( JSContext *  cx)

Create the JS internalBinding function.

◆ createInternalBindingsForNamespace()

JSObject * createInternalBindingsForNamespace ( JSContext *  cx,
JSFunctionSpec *  methodSpecs 
)

◆ getInternalBindingPyFn()

PyObject * getInternalBindingPyFn ( JSContext *  cx)

Convert the internalBinding(namespace) function to a Python function.

◆ getInternalBindingsByNamespace()

JSObject * getInternalBindingsByNamespace ( JSContext *  cx,
JSLinearString *  namespaceStr 
)