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

Add missing static declarations

This fixes a lot of -Wmissing-prototype warnings.

Also remove _pygi_marshal_cleanup_closure_unref() which is not used anywhere.
parent 5f88d301
......@@ -749,7 +749,7 @@ create_property (const gchar *prop_name,
return pspec;
}
GParamSpec *
static GParamSpec *
pyg_param_spec_from_object (PyObject *tuple)
{
gint val_length;
......@@ -1810,7 +1810,7 @@ pyg_threads_init (PyObject *unused, PyObject *args, PyObject *kwargs)
}
/* Only for backwards compatibility */
int
static int
pygobject_enable_threads(void)
{
if (!pyglib_enable_threads())
......
......@@ -671,7 +671,7 @@ pyg_type_get_bases(GType gtype)
*
* Returns: a PyTypeObject for the new type or NULL if it couldn't be created
*/
PyTypeObject *
static PyTypeObject *
pygobject_new_with_interfaces(GType gtype)
{
PyGILState_STATE state;
......
......@@ -43,7 +43,7 @@ PyGIArgCache * _arg_cache_new_for_interface (GIInterfaceInfo *iface_info,
gssize c_arg_index,
gssize py_arg_index);
/* cleanup */
void
static void
_pygi_arg_cache_free (PyGIArgCache *cache)
{
if (cache == NULL)
......
......@@ -36,7 +36,7 @@ static Pycairo_CAPI_t *Pycairo_CAPI;
#include <pyglib-python-compat.h>
PyObject *
static PyObject *
cairo_context_to_arg (PyObject *value,
GIInterfaceInfo *interface_info,
GITransfer transfer,
......@@ -55,7 +55,7 @@ cairo_context_to_arg (PyObject *value,
Py_RETURN_NONE;
}
PyObject *
static PyObject *
cairo_context_from_arg (GIInterfaceInfo *interface_info, gpointer data)
{
cairo_t *context = (cairo_t*) data;
......@@ -65,7 +65,7 @@ cairo_context_from_arg (GIInterfaceInfo *interface_info, gpointer data)
return PycairoContext_FromContext (context, &PycairoContext_Type, NULL);
}
PyObject *
static PyObject *
cairo_context_release (GIBaseInfo *base_info,
gpointer struct_)
{
......@@ -74,7 +74,7 @@ cairo_context_release (GIBaseInfo *base_info,
}
PyObject *
static PyObject *
cairo_surface_to_arg (PyObject *value,
GIInterfaceInfo *interface_info,
GITransfer transfer,
......@@ -94,7 +94,7 @@ cairo_surface_to_arg (PyObject *value,
Py_RETURN_NONE;
}
PyObject *
static PyObject *
cairo_surface_from_arg (GIInterfaceInfo *interface_info, gpointer data)
{
cairo_surface_t *surface = (cairo_surface_t*) data;
......@@ -104,7 +104,7 @@ cairo_surface_from_arg (GIInterfaceInfo *interface_info, gpointer data)
return PycairoSurface_FromSurface (surface, NULL);
}
PyObject *
static PyObject *
cairo_surface_release (GIBaseInfo *base_info,
gpointer struct_)
{
......@@ -113,7 +113,7 @@ cairo_surface_release (GIBaseInfo *base_info,
}
PyObject *
static PyObject *
cairo_path_to_arg (PyObject *value,
GIInterfaceInfo *interface_info,
GITransfer transfer,
......@@ -133,7 +133,7 @@ cairo_path_to_arg (PyObject *value,
Py_RETURN_NONE;
}
PyObject *
static PyObject *
cairo_path_from_arg (GIInterfaceInfo *interface_info, gpointer data)
{
cairo_path_t *path = (cairo_path_t*) data;
......@@ -141,7 +141,7 @@ cairo_path_from_arg (GIInterfaceInfo *interface_info, gpointer data)
return PycairoPath_FromPath (path);
}
PyObject *
static PyObject *
cairo_path_release (GIBaseInfo *base_info,
gpointer struct_)
{
......@@ -149,7 +149,7 @@ cairo_path_release (GIBaseInfo *base_info,
Py_RETURN_NONE;
}
PyObject *
static PyObject *
cairo_font_options_to_arg (PyObject *value,
GIInterfaceInfo *interface_info,
GITransfer transfer,
......@@ -169,7 +169,7 @@ cairo_font_options_to_arg (PyObject *value,
Py_RETURN_NONE;
}
PyObject *
static PyObject *
cairo_font_options_from_arg (GIInterfaceInfo *interface_info, gpointer data)
{
cairo_font_options_t *font_options = (cairo_font_options_t*) data;
......@@ -177,7 +177,7 @@ cairo_font_options_from_arg (GIInterfaceInfo *interface_info, gpointer data)
return PycairoFontOptions_FromFontOptions (cairo_font_options_copy (font_options));
}
PyObject *
static PyObject *
cairo_font_options_release (GIBaseInfo *base_info,
gpointer struct_)
{
......
......@@ -41,7 +41,7 @@ typedef struct {
static GPtrArray *foreign_structs = NULL;
void
static void
init_foreign_structs ()
{
foreign_structs = g_ptr_array_new ();
......
......@@ -171,15 +171,6 @@ pygi_marshal_cleanup_args_to_py_parameter_fail (PyGIInvokeState *state,
state->failed = TRUE;
}
void
_pygi_marshal_cleanup_closure_unref (PyGIInvokeState *state,
PyGIArgCache *arg_cache,
gpointer data,
gboolean was_processed)
{
g_closure_unref ( (GClosure *)data);
}
void
_pygi_marshal_cleanup_from_py_utf8 (PyGIInvokeState *state,
PyGIArgCache *arg_cache,
......
......@@ -53,7 +53,7 @@ test_interface_get_type (void)
return gtype;
}
void test_unknown_iface_method (TestInterface *iface)
static void test_unknown_iface_method (TestInterface *iface)
{
}
......
......@@ -14,7 +14,7 @@ static PyObject * _wrap_TestInterface__do_iface_method(PyObject *cls,
PyObject *args,
PyObject *kwargs);
GType
static GType
test_type_get_type(void)
{
static GType gtype = 0;
......@@ -339,7 +339,7 @@ test_object_callback (GObject *object, GObject *o)
return o;
}
void
static void
connectcallbacks (GObject *object)
{
......
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