Skip to content

Commit

Permalink
[gi] use the right argument type for callback
Browse files Browse the repository at this point in the history
  • Loading branch information
nacho committed Jan 21, 2011
1 parent a060287 commit ce52101
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions gi/pygi-foreign-cairo.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ cairo_context_to_arg (PyObject *value,
}

PyObject *
cairo_context_from_arg (GITypeInfo *type_info, GIArgument *arg)
cairo_context_from_arg (GITypeInfo *type_info, gpointer data)
{
cairo_t *context = (cairo_t*) arg;
cairo_t *context = (cairo_t*) data;

cairo_reference (context);

Expand Down Expand Up @@ -95,9 +95,9 @@ cairo_surface_to_arg (PyObject *value,
}

PyObject *
cairo_surface_from_arg (GITypeInfo *type_info, GIArgument *arg)
cairo_surface_from_arg (GITypeInfo *type_info, gpointer data)
{
cairo_surface_t *surface = (cairo_surface_t*) arg;
cairo_surface_t *surface = (cairo_surface_t*) data;

cairo_surface_reference (surface);

Expand Down
4 changes: 2 additions & 2 deletions gi/pygi-foreign-gvariant.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ g_variant_to_arg (PyObject *value,

PyObject *
g_variant_from_arg (GITypeInfo *type_info,
GIArgument *arg)
gpointer data)
{
GVariant *variant = (GVariant *) arg;
GVariant *variant = (GVariant *) data;
GITypeInfo *interface_info = g_type_info_get_interface (type_info);
PyObject *type = _pygi_type_import_by_gi_info (interface_info);

Expand Down
2 changes: 1 addition & 1 deletion gi/pygi-foreign-gvariant.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PyObject *g_variant_to_arg(PyObject *value,
GIArgument *arg);

PyObject *g_variant_from_arg(GITypeInfo *type_info,
GIArgument *arg);
gpointer data);

PyObject *g_variant_release_foreign (GIBaseInfo *base_info,
gpointer struct_);
Expand Down
2 changes: 1 addition & 1 deletion gi/pygi-foreign.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pygi_register_foreign_struct_real (const char* namespace_,
PyGIArgOverrideFromGIArgumentFunc from_func,
PyGIArgOverrideReleaseFunc release_func)
{
PyGIForeignStruct *new_struct = g_slice_new0 (PyGIForeignStruct);
PyGIForeignStruct *new_struct = g_slice_new (PyGIForeignStruct);
new_struct->namespace = namespace_;
new_struct->name = name;
new_struct->to_func = to_func;
Expand Down
2 changes: 1 addition & 1 deletion gi/pygi.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ typedef PyObject * (*PyGIArgOverrideToGIArgumentFunc) (PyObject *value,
GITransfer transfer,
GIArgument *arg);
typedef PyObject * (*PyGIArgOverrideFromGIArgumentFunc) (GITypeInfo *type_info,
GIArgument *arg);
gpointer data);
typedef PyObject * (*PyGIArgOverrideReleaseFunc) (GITypeInfo *type_info,
gpointer struct_);

Expand Down

0 comments on commit ce52101

Please sign in to comment.