From c33327ff43db2e0fd8f4c2d9a7a4333a50e8c605 Mon Sep 17 00:00:00 2001 From: staticfox Date: Thu, 21 Apr 2016 03:01:17 -0400 Subject: Python: Refactor python support Closes #1866 --- src/modules/pythoncore/kvircmodule.h | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'src/modules/pythoncore/kvircmodule.h') diff --git a/src/modules/pythoncore/kvircmodule.h b/src/modules/pythoncore/kvircmodule.h index 32b30e2f0..4fffacee4 100644 --- a/src/modules/pythoncore/kvircmodule.h +++ b/src/modules/pythoncore/kvircmodule.h @@ -54,25 +54,7 @@ PyMODINIT_FUNC python_init(); #ifdef __cplusplus extern "C" { #endif - - // Total number of C API pointers - #define PyKVIrc_API_NUM 10 - - #ifdef KVIRC_MODULE - // This section is used when compiling kvircmodule.cpp - #if 0 - PyObject * PyKVIrc_echo(PyObject * pSelf, PyObject * pArgs); - PyObject * PyKVIrc_say(PyObject * pSelf, PyObject * pArgs); - PyObject * PyKVIrc_warning(PyObject * pSelf, PyObject * pArgs); - PyObject * PyKVIrc_getLocal(PyObject * pSelf, PyObject * pArgs); - PyObject * PyKVIrc_setLocal(PyObject * pSelf, PyObject * pArgs); - PyObject * PyKVIrc_getGlobal(PyObject * pSelf, PyObject * pArgs); - PyObject * PyKVIrc_setGlobal(PyObject * pSelf, PyObject * pArgs); - PyObject * PyKVIrc_eval(PyObject * pSelf, PyObject * pArgs); - PyObject * PyKVIrc_internalWarning(PyObject * pSelf, PyObject * pArgs); - PyObject * PyKVIrc_error(PyObject * pSelf, PyObject * pArgs); - #endif - #else + #ifndef KVIRC_MODULE // This section is used in modules that use kvircmodule's API static void ** PyKVIrc_API; @@ -102,7 +84,7 @@ extern "C" { * In case on unsuccess, it sets the exception * \return int */ - static int import_kvirc() + inline static int import_kvirc() { PyObject * pModule = PyImport_ImportModule("kvirc"); if(pModule) -- cgit v1.3.1-10-gc9f91