diff options
author | Stef Walter <stefw@collabora.co.uk> | 2011-12-09 18:19:24 +0100 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2011-12-15 07:22:37 +0100 |
commit | 14fb10d14b07cef6af8952bfdd0bd4d864876607 (patch) | |
tree | b6198b0e2e6f925f1291bffd3cc1c19c0672e393 /glib/tests/array-test.c | |
parent | 162bafee37ccd5d58260423a8120fdcba25ecad6 (diff) | |
download | glib-14fb10d14b07cef6af8952bfdd0bd4d864876607.tar.gz |
GBytes: add a size argument to g_bytes_get_data
* An out size argument so that this is more easily bindable
by gobject-introspection.
https://bugzilla.gnome.org/show_bug.cgi?id=665879
Diffstat (limited to 'glib/tests/array-test.c')
-rw-r--r-- | glib/tests/array-test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/glib/tests/array-test.c b/glib/tests/array-test.c index de3a8ff6f..7caab8716 100644 --- a/glib/tests/array-test.c +++ b/glib/tests/array-test.c @@ -781,6 +781,7 @@ byte_array_free_to_bytes (void) GByteArray *gbarray; gpointer memory; GBytes *bytes; + gsize size; gbarray = g_byte_array_new (); g_byte_array_append (gbarray, (guint8 *)"woooweeewow", 11); @@ -789,7 +790,8 @@ byte_array_free_to_bytes (void) bytes = g_byte_array_free_to_bytes (gbarray); g_assert (bytes != NULL); g_assert_cmpuint (g_bytes_get_size (bytes), ==, 11); - g_assert (g_bytes_get_data (bytes) == memory); + g_assert (g_bytes_get_data (bytes, &size) == memory); + g_assert_cmpuint (size, ==, 11); g_bytes_unref (bytes); } |