diff options
-rw-r--r-- | gir/gio-2.0.c | 5 | ||||
-rw-r--r-- | gobject-introspection.morph | 8 | ||||
-rw-r--r-- | tests/gimarshallingtests.c | 64 |
3 files changed, 76 insertions, 1 deletions
diff --git a/gir/gio-2.0.c b/gir/gio-2.0.c index 80fe1cb7..89ec0e0d 100644 --- a/gir/gio-2.0.c +++ b/gir/gio-2.0.c @@ -30710,7 +30710,10 @@ * g_socket_get_available_bytes: * @socket: a #GSocket * - * Get the amount of data pending in the OS input buffer. + * Get the amount of data that can be read from the socket without + * blocking. In the case of datagram sockets this returns the size + * of the first datagram and not the sum of the sizes of all currently + * queued datagrams. * * Returns: the number of bytes that can be read from the socket without blocking or -1 on error. * Since: 2.32 diff --git a/gobject-introspection.morph b/gobject-introspection.morph new file mode 100644 index 00000000..734fbc58 --- /dev/null +++ b/gobject-introspection.morph @@ -0,0 +1,8 @@ +{ + "name": "gobject-introspection", + "kind": "chunk", + "build-system": "autotools", + "configure-commands": [ + "sh autogen.sh --prefix=\"$PREFIX\" --disable-tests" + ] +} diff --git a/tests/gimarshallingtests.c b/tests/gimarshallingtests.c index 7d392544..9dc66bea 100644 --- a/tests/gimarshallingtests.c +++ b/tests/gimarshallingtests.c @@ -1787,6 +1787,28 @@ gi_marshalling_tests_garray_uint64_none_return (void) } /** + * gi_marshalling_tests_garray_uint64_none_return: + * + * Returns: (element-type guint64) (transfer none): + */ +GArray * +gi_marshalling_tests_garray_uint64_none_return (void) +{ + static GArray *array = NULL; + guint64 i; + + if (array == NULL) { + array = g_array_new (TRUE, TRUE, sizeof (guint64)); + i = 0; + g_array_append_val (array, i); + i = G_MAXUINT64; + g_array_append_val (array, i); + } + + return array; +} + +/** * gi_marshalling_tests_garray_utf8_none_return: * * Returns: (element-type utf8) (transfer none): @@ -1876,6 +1898,18 @@ gi_marshalling_tests_garray_uint64_none_in (GArray *array_) } /** + * gi_marshalling_tests_garray_uint64_none_in: + * @array_: (element-type guint64) (transfer none): + */ +void +gi_marshalling_tests_garray_uint64_none_in (GArray *array_) +{ + g_assert_cmpint(array_->len, ==, 2); + g_assert_cmpint(g_array_index (array_, guint64, 0), ==, 0); + g_assert_cmpint(g_array_index (array_, guint64, 1), ==, G_MAXUINT64); +} + +/** * gi_marshalling_tests_garray_utf8_none_in: * @array_: (element-type utf8) (transfer none): */ @@ -2424,6 +2458,24 @@ gi_marshalling_tests_glist_uint32_none_return (void) } /** + * gi_marshalling_tests_glist_uint32_none_return: + * + * Returns: (element-type guint32) (transfer none): + */ +GList * +gi_marshalling_tests_glist_uint32_none_return (void) +{ + static GList *list = NULL; + + if (list == NULL) { + list = g_list_append(list, GUINT_TO_POINTER(0)); + list = g_list_append(list, GUINT_TO_POINTER(G_MAXUINT32)); + } + + return list; +} + +/** * gi_marshalling_tests_glist_utf8_none_return: * * Returns: (element-type utf8) (transfer none): @@ -2504,6 +2556,18 @@ gi_marshalling_tests_glist_uint32_none_in (GList *list) } /** + * gi_marshalling_tests_glist_uint32_none_in: + * @list: (element-type guint32) (transfer none): + */ +void +gi_marshalling_tests_glist_uint32_none_in (GList *list) +{ + g_assert_cmpint(g_list_length(list), ==, 2); + g_assert_cmpint(GPOINTER_TO_UINT(g_list_nth_data(list, 0)), ==, 0); + g_assert_cmpint(GPOINTER_TO_UINT(g_list_nth_data(list, 1)), ==, G_MAXUINT32); +} + +/** * gi_marshalling_tests_glist_utf8_none_in: * @list: (element-type utf8) (transfer none): */ |