From: Johan Dahlin Date: Tue, 9 Mar 2010 15:28:22 +0000 (-0300) Subject: [everything] Add alternative boxed constructors X-Git-Tag: GOBJECT_INTROSPECTION_0_6_9~8 X-Git-Url: http://git.roojs.org/?p=gnome.gobject-introspection;a=commitdiff_plain;h=ab2da23f4793016bfe4b2b327ddf6e10a94ea907 [everything] Add alternative boxed constructors --- diff --git a/gir/Everything-1.0-expected.gir b/gir/Everything-1.0-expected.gir index 6bf6c8b..a284c44 100644 --- a/gir/Everything-1.0-expected.gir +++ b/gir/Everything-1.0-expected.gir @@ -31,6 +31,42 @@ and/or use gtk-doc annotations. --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/gir/everything.c b/gir/everything.c index 6796088..3957d06 100644 --- a/gir/everything.c +++ b/gir/everything.c @@ -1,4 +1,5 @@ #include +#include #include "everything.h" #include @@ -1256,6 +1257,39 @@ test_boxed_new (void) return boxed; } +TestBoxed * +test_boxed_new_alternative_constructor1 (int i) +{ + TestBoxed *boxed = g_slice_new0(TestBoxed); + boxed->priv = g_slice_new0(TestBoxedPrivate); + boxed->priv->magic = 0xdeadbeef; + boxed->some_int8 = i; + + return boxed; +} + +TestBoxed * +test_boxed_new_alternative_constructor2 (int i, int j) +{ + TestBoxed *boxed = g_slice_new0(TestBoxed); + boxed->priv = g_slice_new0(TestBoxedPrivate); + boxed->priv->magic = 0xdeadbeef; + boxed->some_int8 = i + j; + + return boxed; +} + +TestBoxed * +test_boxed_new_alternative_constructor3 (char *s) +{ + TestBoxed *boxed = g_slice_new0(TestBoxed); + boxed->priv = g_slice_new0(TestBoxedPrivate); + boxed->priv->magic = 0xdeadbeef; + boxed->some_int8 = atoi(s); + + return boxed; +} + TestBoxed * test_boxed_copy (TestBoxed *boxed) { diff --git a/gir/everything.h b/gir/everything.h index be4f6c6..04c27d7 100644 --- a/gir/everything.h +++ b/gir/everything.h @@ -216,6 +216,10 @@ struct _TestBoxed GType test_boxed_get_type (void); TestBoxed *test_boxed_new (void); +TestBoxed *test_boxed_new_alternative_constructor1 (int i); +TestBoxed *test_boxed_new_alternative_constructor2 (int i, int j); +TestBoxed *test_boxed_new_alternative_constructor3 (char *s); + TestBoxed *test_boxed_copy (TestBoxed *boxed); gboolean test_boxed_equals (TestBoxed *boxed, TestBoxed *other);