| 1 | #include "test_boxed.h" |
| 2 | |
| 3 | #include <glib.h> |
| 4 | #include <glib-object.h> |
| 5 | |
| 6 | GBExample* gi_cpp_gbexample_new () |
| 7 | { |
| 8 | return g_new0 (GBExample, 1); |
| 9 | } |
| 10 | |
| 11 | static GBExample* |
| 12 | gb_example_copy (const GBExample * src) |
| 13 | { |
| 14 | GBExample *out = gi_cpp_gbexample_new (); |
| 15 | *out = *src; |
| 16 | return out; |
| 17 | } |
| 18 | |
| 19 | static void |
| 20 | gb_example_free (GBExample * ex) |
| 21 | { |
| 22 | g_free (ex); |
| 23 | } |
| 24 | |
| 25 | G_DEFINE_BOXED_TYPE (GBExample, gi_cpp_gbexample, gb_example_copy, gb_example_free) |
| 26 | |
| 27 | CBExample* gi_cpp_cbexample_new () |
| 28 | { |
| 29 | return g_new0 (CBExample, 1); |
| 30 | } |
| 31 | |
| 32 | void gi_cpp_cbexample_free (CBExample * ex) |
| 33 | { |
| 34 | g_free (ex); |
| 35 | } |
| 36 |