Commit 13767942 authored by Martin Pitt's avatar Martin Pitt
Browse files

Fix function prototypes and static functions

These cause errors/warnings with -Wstrict-prototypes.
parent d47927f1
......@@ -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; \
......
......@@ -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 ();
}
......
......@@ -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)
......
......@@ -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)
......
......@@ -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;
......
......@@ -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__ */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment