Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib/mu/MuPy/MuPy/PyModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ namespace Mu
static NODE_DECLARATION(nPyTuple_GetItem, Pointer);
static NODE_DECLARATION(nPyString_Check, bool);
static NODE_DECLARATION(nPyFunction_Check, bool);
static NODE_DECLARATION(nPyObject_Str, Pointer);
static NODE_DECLARATION(nPyImport_Import, Pointer);
static NODE_DECLARATION(nPy_TYPE, Pointer);
static NODE_DECLARATION(nPyModule_GetName, Pointer);
Expand Down
10 changes: 10 additions & 0 deletions src/lib/mu/MuPy/PyModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ namespace Mu
new Function(c, "PyFunction_Check", nPyFunction_Check, None, Return, "bool", Parameters,
new ParameterVariable(c, "obj", "python.PyObject"), End),

new Function(c, "PyObject_Str", nPyObject_Str, None, Return, "python.PyObject", Parameters,
new ParameterVariable(c, "obj", "python.PyObject"), End),

new Function(c, "Py_TYPE", nPy_TYPE, None, Return, "python.PyTypeObject", Parameters,
new ParameterVariable(c, "obj", "python.PyObject"), End),

Expand Down Expand Up @@ -1046,6 +1049,13 @@ namespace Mu
NODE_RETURN(PyBytes_Check(obj));
}

NODE_IMPLEMENTATION(PyModule::nPyObject_Str, Pointer)
{
PyLockObject locker;
PyObject* obj = NODE_ARG_OBJECT(0, PyObject);
NODE_RETURN(PyObject_Str(obj));
}

NODE_IMPLEMENTATION(PyModule::nPyObject_CallObject, Pointer)
{
PyLockObject locker;
Expand Down
Loading
Loading