From 1a991a476428fa1d72c8658b2dc74efea9b622fd Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 8 Dec 2009 12:25:03 +0100 Subject: [PATCH] python plugin: Try to avoid casting errors with Sun's cc. "python.c", line 534: warning: argument #1 is incompatible with prototype: prototype: pointer to void : "python.c", line 470 argument : pointer to function(pointer to const char, pointer to function(..) returning void, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning int "python.c", line 534: warning: argument #2 is incompatible with prototype: prototype: pointer to void : "python.c", line 470 argument : pointer to function(int, pointer to const char, pointer to struct user_data_s {pointer to void data, pointer to function(..) returning void free_func}) returning void --- src/python.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/python.c b/src/python.c index 8491649b..006aecf6 100644 --- a/src/python.c +++ b/src/python.c @@ -531,19 +531,23 @@ static PyObject *cpy_register_read(PyObject *self, PyObject *args, PyObject *kwd } static PyObject *cpy_register_log(PyObject *self, PyObject *args, PyObject *kwds) { - return cpy_register_generic_userdata(plugin_register_log, cpy_log_callback, args, kwds); + return cpy_register_generic_userdata((void *) plugin_register_log, + (void *) cpy_log_callback, args, kwds); } static PyObject *cpy_register_write(PyObject *self, PyObject *args, PyObject *kwds) { - return cpy_register_generic_userdata(plugin_register_write, cpy_write_callback, args, kwds); + return cpy_register_generic_userdata((void *) plugin_register_write, + (void *) cpy_write_callback, args, kwds); } static PyObject *cpy_register_notification(PyObject *self, PyObject *args, PyObject *kwds) { - return cpy_register_generic_userdata(plugin_register_notification, cpy_notification_callback, args, kwds); + return cpy_register_generic_userdata((void *) plugin_register_notification, + (void *) cpy_notification_callback, args, kwds); } static PyObject *cpy_register_flush(PyObject *self, PyObject *args, PyObject *kwds) { - return cpy_register_generic_userdata(plugin_register_flush, cpy_flush_callback, args, kwds); + return cpy_register_generic_userdata((void *) plugin_register_flush, + (void *) cpy_flush_callback, args, kwds); } static PyObject *cpy_register_shutdown(PyObject *self, PyObject *args, PyObject *kwds) { -- 2.11.0