aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/pythoncore/kvircmodule.h
diff options
context:
space:
mode:
authorGravatar staticfox2016-04-21 03:01:17 -0400
committerGravatar staticfox2016-04-21 03:12:20 -0400
commitc33327ff43db2e0fd8f4c2d9a7a4333a50e8c605 (patch)
treeba8c64caaf02b9d65607022c6f5b3dd0fffb8dfb /src/modules/pythoncore/kvircmodule.h
parentMerge pull request #1951 from AlexanderP/travis_ppa (diff)
downloadKVIrc-c33327ff43db2e0fd8f4c2d9a7a4333a50e8c605.tar.gz
KVIrc-c33327ff43db2e0fd8f4c2d9a7a4333a50e8c605.tar.bz2
KVIrc-c33327ff43db2e0fd8f4c2d9a7a4333a50e8c605.zip
Python: Refactor python support
Closes #1866
Diffstat (limited to 'src/modules/pythoncore/kvircmodule.h')
-rw-r--r--src/modules/pythoncore/kvircmodule.h22
1 files changed, 2 insertions, 20 deletions
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)