diff options
-rw-r--r-- | pyuno/source/module/pyuno_module.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index a50ca379cf9a..9fe1f07f30b6 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -823,6 +823,20 @@ static PyObject *setCurrentContext( return ret.getAcquired(); } +static PyObject *sal_debug( + SAL_UNUSED_PARAMETER PyObject *, SAL_UNUSED_PARAMETER PyObject * args ) +{ + Py_INCREF( Py_None ); + if( !PyTuple_Check( args ) || PyTuple_Size( args) != 1 ) + return Py_None; + + OUString line = pyString2ustring( PyTuple_GetItem( args, 0 ) ); + + SAL_DEBUG(line.toUtf8().getStr()); + + return Py_None; +} + } struct PyMethodDef PyUNOModule_methods [] = @@ -843,6 +857,7 @@ struct PyMethodDef PyUNOModule_methods [] = {"invoke", invoke, METH_VARARGS | METH_KEYWORDS, nullptr}, {"setCurrentContext", setCurrentContext, METH_VARARGS, nullptr}, {"getCurrentContext", getCurrentContext, METH_VARARGS, nullptr}, + {"sal_debug", sal_debug, METH_VARARGS, nullptr}, {nullptr, nullptr, 0, nullptr} }; |