diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-11-11 17:41:30 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-11-13 12:09:49 +0900 |
commit | da9cd0c056c8275033fca84a1c8d49a8edb0c8ee (patch) | |
tree | 2521f74c0b2868d82518e13053fb01cc179e9a23 /superkaramba/examples/globalMouse/extension/xcursor.c | |
parent | 5dab6232ef3b3715630cf88eb40c4c6021e65f07 (diff) | |
download | tdeutils-da9cd0c0.tar.gz tdeutils-da9cd0c0.zip |
superkaramba: convert examples to python3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'superkaramba/examples/globalMouse/extension/xcursor.c')
-rw-r--r-- | superkaramba/examples/globalMouse/extension/xcursor.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/superkaramba/examples/globalMouse/extension/xcursor.c b/superkaramba/examples/globalMouse/extension/xcursor.c index 8dad240..fbe80fa 100644 --- a/superkaramba/examples/globalMouse/extension/xcursor.c +++ b/superkaramba/examples/globalMouse/extension/xcursor.c @@ -26,6 +26,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ****************************************************************************/ +#define PY_SSIZE_T_CLEAN #include <Python.h> #include <X11/Xlib.h> @@ -96,9 +97,16 @@ static PyMethodDef xcursorMethods[] = {NULL, NULL, 0, NULL} /* Sentinel */ }; -void initxcursor(void) +static struct PyModuleDef xcursordef = { - (void) Py_InitModule("xcursor", xcursorMethods); -} - + PyModuleDef_HEAD_INIT, + "xcursor", + NULL, + -1, + xcursorMethods +}; +PyMODINIT_FUNC PyInit_xcursor(void) +{ + return PyModule_Create(&xcursordef); +} |