PythonMonkey   v1.1.1 (dev)
Loading...
Searching...
No Matches
pythonmonkey.hh File Reference

This file defines the pythonmonkey module, along with its various functions. More...

#include "include/JobQueue.hh"
#include <jsapi.h>
#include <js/CompilationAndEvaluation.h>
#include <js/Initialization.h>
#include <Python.h>
Include dependency graph for pythonmonkey.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PyObject * getPythonMonkeyNull ()
 
PyObject * getPythonMonkeyBigInt ()
 
PyMODINIT_FUNC PyInit_pythonmonkey (void)
 Initialization function for the module. Starts the JSContext, creates the global object, and sets cleanup functions.
 

Variables

JSContext * GLOBAL_CX
 
JS::PersistentRootedObject jsFunctionRegistry
 
PyMethodDef PythonMonkeyMethods []
 Array of method definitions for the pythonmonkey module.
 
struct PyModuleDef pythonmonkey
 Module definition for the pythonmonkey module.
 
PyObject * SpiderMonkeyError
 PyObject for spidermonkey error type.
 

Detailed Description

This file defines the pythonmonkey module, along with its various functions.

Author
Caleb Aikens (caleb.nosp@m.@kin.nosp@m.gsds..nosp@m.netw.nosp@m.ork)
Date
2022-09-06

Function Documentation

◆ getPythonMonkeyBigInt()

PyObject * getPythonMonkeyBigInt ( )

◆ getPythonMonkeyNull()

PyObject * getPythonMonkeyNull ( )

◆ PyInit_pythonmonkey()

PyMODINIT_FUNC PyInit_pythonmonkey ( void  )

Initialization function for the module. Starts the JSContext, creates the global object, and sets cleanup functions.

Returns
PyObject* - The module object to be passed to the python user

Variable Documentation

◆ GLOBAL_CX

JSContext* GLOBAL_CX
extern

pointer to PythonMonkey's JSContext

◆ jsFunctionRegistry

JS::PersistentRootedObject jsFunctionRegistry
extern

// this is a FinalizationRegistry for JSFunctions that depend on Python functions. It is used to handle reference counts when the JSFunction is finalized

◆ pythonmonkey

struct PyModuleDef pythonmonkey
extern

Module definition for the pythonmonkey module.

◆ PythonMonkeyMethods

PyMethodDef PythonMonkeyMethods[]
extern

Array of method definitions for the pythonmonkey module.

◆ SpiderMonkeyError

PyObject* SpiderMonkeyError
extern

PyObject for spidermonkey error type.