diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-02-04 19:41:30 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-02-04 19:41:30 +0100 |
commit | 869bbfa6f47d128946313a8518a54ec085439a70 (patch) | |
tree | 8cef2419b8afa71758eb4602b59045965f439224 /gir | |
parent | 5ed5b1ed30938dbe70e50feffa56ee5ee47696d2 (diff) | |
download | gobject-introspection-869bbfa6f47d128946313a8518a54ec085439a70.tar.gz |
gir: Update annotations from glib git master
Diffstat (limited to 'gir')
-rw-r--r-- | gir/glib-2.0.c | 29 | ||||
-rw-r--r-- | gir/gobject-2.0.c | 5 |
2 files changed, 28 insertions, 6 deletions
diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c index 6d643089..465a4f6a 100644 --- a/gir/glib-2.0.c +++ b/gir/glib-2.0.c @@ -20117,7 +20117,7 @@ * g_key_file_get_comment: * @key_file: a #GKeyFile * @group_name: (nullable): a group name, or %NULL - * @key: a key + * @key: (nullable): a key * @error: return location for a #GError * * Retrieves a comment above @key from @group_name. @@ -23864,6 +23864,23 @@ /** + * g_memdup2: + * @mem: (nullable): the memory to copy. + * @byte_size: the number of bytes to copy. + * + * Allocates @byte_size bytes of memory, and copies @byte_size bytes into it + * from @mem. If @mem is %NULL it returns %NULL. + * + * This replaces g_memdup(), which was prone to integer overflows when + * converting the argument from a #gsize to a #guint. + * + * Returns: (nullable): a pointer to the newly-allocated copy of the memory, + * or %NULL if @mem is %NULL. + * Since: 2.68 + */ + + +/** * g_memmove: * @dest: the destination address to copy the bytes to. * @src: the source address to copy the bytes from. @@ -33960,8 +33977,12 @@ * behaviour, to verify that appropriate warnings are given. It might, in some * cases, be useful to turn this off with if running tests under valgrind; * in tests that use g_test_init(), the option `-m no-undefined` disables - * those tests, while `-m undefined` explicitly enables them (the default - * behaviour). + * those tests, while `-m undefined` explicitly enables them (normally + * the default behaviour). + * + * Since GLib 2.68, if GLib was compiled with gcc or clang and + * [AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer) + * is enabled, the default changes to not exercising undefined behaviour. * * Returns: %TRUE if tests may provoke programming errors */ @@ -36736,7 +36757,7 @@ * be a scope ID attached to the address. Eg, `fe80::1234%``em1` (or * `fe80::1234%``25em1` if the string is still encoded). * - * Returns: (not nullable): @uri's host. + * Returns: (nullable): @uri's host. * Since: 2.66 */ diff --git a/gir/gobject-2.0.c b/gir/gobject-2.0.c index 703c20e1..eaecc72d 100644 --- a/gir/gobject-2.0.c +++ b/gir/gobject-2.0.c @@ -1887,6 +1887,7 @@ * g_clear_signal_handler: * @handler_id_ptr: A pointer to a handler ID (of type #gulong) of the handler to be disconnected. * @instance: (type GObject.Object): The instance to remove the signal handler from. + * This pointer may be %NULL or invalid, if the handler ID is zero. * * Disconnects a handler from @instance so it will not be called during * any future or currently ongoing emissions of the signal it has been @@ -1894,8 +1895,8 @@ * * If the handler ID is 0 then this function does nothing. * - * A macro is also included that allows this function to be used without - * pointer casts. + * There is also a macro version of this function so that the code + * will be inlined. * * Since: 2.62 */ |