diff options
author | Martin Pitt <martinpitt@gnome.org> | 2013-01-15 09:46:01 +0100 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2013-01-15 09:46:01 +0100 |
commit | 137679426ff39507e15f08e9e6428d851fee06b7 (patch) | |
tree | bfa1daef868dc62ac457b1cad58f7d62e6009e07 | |
parent | d47927f1701a11aec8566425f22688c5df73d7f2 (diff) | |
download | pygobject-137679426ff39507e15f08e9e6428d851fee06b7.tar.gz |
Fix function prototypes and static functions
These cause errors/warnings with -Wstrict-prototypes.
-rw-r--r-- | gi/_glib/pyglib-python-compat.h | 2 | ||||
-rw-r--r-- | gi/pygi-foreign.c | 2 | ||||
-rw-r--r-- | gi/pygi-marshal-from-py.c | 4 | ||||
-rw-r--r-- | gi/pygi-marshal-to-py.c | 4 | ||||
-rw-r--r-- | gi/pygi-source.c | 2 | ||||
-rw-r--r-- | gi/pygi-source.h | 2 |
6 files changed, 9 insertions, 7 deletions
diff --git a/gi/_glib/pyglib-python-compat.h b/gi/_glib/pyglib-python-compat.h index 5af14f8e..96a20c00 100644 --- a/gi/_glib/pyglib-python-compat.h +++ b/gi/_glib/pyglib-python-compat.h @@ -146,6 +146,7 @@ static int _pyglib_init_##modname(PyObject *module) #endif #define PYGLIB_MODULE_START(symbol, modname) \ +DL_EXPORT(void) init##symbol(void); \ DL_EXPORT(void) init##symbol(void) \ { \ PyObject *module; \ @@ -184,6 +185,7 @@ PyTypeObject symbol = { \ NULL, \ NULL \ }; \ +PyMODINIT_FUNC PyInit_##symbol(void); \ PyMODINIT_FUNC PyInit_##symbol(void) \ { \ PyObject *module; \ diff --git a/gi/pygi-foreign.c b/gi/pygi-foreign.c index ef5abaa7..75373992 100644 --- a/gi/pygi-foreign.c +++ b/gi/pygi-foreign.c @@ -42,7 +42,7 @@ typedef struct { static GPtrArray *foreign_structs = NULL; static void -init_foreign_structs () +init_foreign_structs (void) { foreign_structs = g_ptr_array_new (); } diff --git a/gi/pygi-marshal-from-py.c b/gi/pygi-marshal-from-py.c index 4ddfbb47..a676123a 100644 --- a/gi/pygi-marshal-from-py.c +++ b/gi/pygi-marshal-from-py.c @@ -32,7 +32,7 @@ #include "pygi-marshal-cleanup.h" #include "pygi-marshal-from-py.h" -gboolean +static gboolean gi_argument_from_py_ssize_t (GIArgument *arg_out, Py_ssize_t size_in, GITypeTag type_tag) @@ -134,7 +134,7 @@ gi_argument_from_py_ssize_t (GIArgument *arg_out, return FALSE; } -gboolean +static gboolean gi_argument_from_c_long (GIArgument *arg_out, long c_long_in, GITypeTag type_tag) diff --git a/gi/pygi-marshal-to-py.c b/gi/pygi-marshal-to-py.c index d5a07349..a6d90c26 100644 --- a/gi/pygi-marshal-to-py.c +++ b/gi/pygi-marshal-to-py.c @@ -34,7 +34,7 @@ #include "pygi-marshal-cleanup.h" #include "pygi-marshal-to-py.h" -gboolean +static gboolean gi_argument_to_c_long (GIArgument *arg_in, long *c_long_out, GITypeTag type_tag) @@ -72,7 +72,7 @@ gi_argument_to_c_long (GIArgument *arg_in, } } -gboolean +static gboolean gi_argument_to_gsize (GIArgument *arg_in, gsize *gsize_out, GITypeTag type_tag) diff --git a/gi/pygi-source.c b/gi/pygi-source.c index 73772bd5..b713b732 100644 --- a/gi/pygi-source.c +++ b/gi/pygi-source.c @@ -232,7 +232,7 @@ pyg_source_set_callback(PyGObject *self_module, PyObject *args) * GSourceFuncs which call back to Python. */ PyObject* -pyg_source_new () +pyg_source_new (void) { PyGRealSource *source = NULL; PyObject *py_type; diff --git a/gi/pygi-source.h b/gi/pygi-source.h index 024cf15b..a602767f 100644 --- a/gi/pygi-source.h +++ b/gi/pygi-source.h @@ -24,7 +24,7 @@ #ifndef __PYGI_SOURCE_H__ #define __PYGI_SOURCE_H__ -PyObject *pyg_source_new (); +PyObject *pyg_source_new (void); PyObject *pyg_source_set_callback (PyGObject *self, PyObject *args); #endif /* __PYGI_SOURCE_H__ */ |