Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Add GIMarshalllingTests function with in parameter as well as GError.
Browse files Browse the repository at this point in the history
This allows bindings to test the ability to clean up (in)
parameters after a GError is set by the wrapped function.
  • Loading branch information
Laszlo Pandy committed Feb 23, 2011
1 parent aecea30 commit 3fe4ad8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/gimarshallingtests.c
Original file line number Diff line number Diff line change
Expand Up @@ -3313,6 +3313,20 @@ gi_marshalling_tests_gerror(GError **error)
GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE);
}

/**
* gi_marshalling_tests_gerror_array_in:
* @in_ints: (array zero-terminated=1):
*/
void
gi_marshalling_tests_gerror_array_in(gint *in_ints, GError **error)
{
GQuark quark = g_quark_from_static_string(GI_MARSHALLING_TESTS_CONSTANT_GERROR_DOMAIN);
g_set_error_literal(error,
quark,
GI_MARSHALLING_TESTS_CONSTANT_GERROR_CODE,
GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE);
}

static GIMarshallingTestsOverridesStruct *
gi_marshalling_tests_overrides_struct_copy (GIMarshallingTestsOverridesStruct *struct_)
{
Expand Down
1 change: 1 addition & 0 deletions tests/gimarshallingtests.h
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ gint gi_marshalling_tests_int_return_out (gint *int_);
#define GI_MARSHALLING_TESTS_CONSTANT_GERROR_MESSAGE "gi-marshalling-tests-gerror-message"

void gi_marshalling_tests_gerror(GError **error);
void gi_marshalling_tests_gerror_array_in(gint *in_ints, GError **error);

/* Overrides */

Expand Down

0 comments on commit 3fe4ad8

Please sign in to comment.