* @brief Convert the `internalBinding(namespace)` function to a Python function */
| 55 | * @brief Convert the `internalBinding(namespace)` function to a Python function |
| 56 | */ |
| 57 | PyObject *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 | } |
no test coverage detected