summaryrefslogtreecommitdiffstats
path: root/superkaramba/examples/globalMouse/extension/xcursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'superkaramba/examples/globalMouse/extension/xcursor.c')
-rw-r--r--superkaramba/examples/globalMouse/extension/xcursor.c16
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);
+}