Skip to content

Commit be4559c

Browse files
authored
Merge pull request #244 from gtk-rs/create-pull-request/patch
Update GIR files (2025-05-11)
2 parents 5acf315 + 31107df commit be4559c

File tree

2 files changed

+114
-45
lines changed

2 files changed

+114
-45
lines changed

GLib-2.0.gir

Lines changed: 95 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2870,7 +2870,9 @@ The array will grow in size automatically if necessary.</doc>
28702870
</parameter>
28712871
<parameter name="data" transfer-ownership="none">
28722872
<doc xml:space="preserve">the byte data to be added</doc>
2873-
<type name="guint8" c:type="const guint8*"/>
2873+
<array length="2" zero-terminated="0" c:type="const guint8*">
2874+
<type name="guint8" c:type="guint8"/>
2875+
</array>
28742876
</parameter>
28752877
<parameter name="len" transfer-ownership="none">
28762878
<doc xml:space="preserve">the number of bytes to add</doc>
@@ -2883,10 +2885,13 @@ The array will grow in size automatically if necessary.</doc>
28832885
%TRUE it frees the actual byte data. If the reference count of
28842886
@array is greater than one, the #GByteArray wrapper is preserved but
28852887
the size of @array will be set to zero.</doc>
2886-
<return-value transfer-ownership="none">
2887-
<doc xml:space="preserve">the element data if @free_segment is %FALSE, otherwise
2888-
%NULL. The element data should be freed using g_free().</doc>
2889-
<type name="guint8" c:type="guint8*"/>
2888+
<return-value transfer-ownership="full" nullable="1">
2889+
<doc xml:space="preserve">the element data if
2890+
@free_segment is %FALSE, otherwise %NULL. The element data
2891+
should be freed using g_free().</doc>
2892+
<array zero-terminated="0" c:type="guint8*">
2893+
<type name="guint8" c:type="guint8"/>
2894+
</array>
28902895
</return-value>
28912896
<parameters>
28922897
<parameter name="array" transfer-ownership="none">
@@ -2979,7 +2984,9 @@ The array will grow in size automatically if necessary.</doc>
29792984
</parameter>
29802985
<parameter name="data" transfer-ownership="none">
29812986
<doc xml:space="preserve">the byte data to be added</doc>
2982-
<type name="guint8" c:type="const guint8*"/>
2987+
<array length="2" zero-terminated="0" c:type="const guint8*">
2988+
<type name="guint8" c:type="guint8"/>
2989+
</array>
29832990
</parameter>
29842991
<parameter name="len" transfer-ownership="none">
29852992
<doc xml:space="preserve">the number of bytes to add</doc>
@@ -3171,9 +3178,11 @@ user data argument.</doc>
31713178
the underlying array is preserved for use elsewhere and returned
31723179
to the caller.</doc>
31733180
<return-value transfer-ownership="full">
3174-
<doc xml:space="preserve">the element data, which should be
3175-
freed using g_free().</doc>
3176-
<type name="guint8" c:type="guint8*"/>
3181+
<doc xml:space="preserve">the element data,
3182+
which should be freed using g_free().</doc>
3183+
<array length="1" zero-terminated="0" c:type="guint8*">
3184+
<type name="guint8" c:type="guint8"/>
3185+
</array>
31773186
</return-value>
31783187
<parameters>
31793188
<parameter name="array" transfer-ownership="none">
@@ -20641,9 +20650,12 @@ This function is not thread-safe. If using a #GPtrArray from multiple
2064120650
threads, use only the atomic g_ptr_array_ref() and g_ptr_array_unref()
2064220651
functions.</doc>
2064320652
<return-value transfer-ownership="full" nullable="1">
20644-
<doc xml:space="preserve">the pointer array if @free_segment is
20645-
%FALSE, otherwise %NULL. The pointer array should be freed using g_free().</doc>
20646-
<type name="gpointer" c:type="gpointer*"/>
20653+
<doc xml:space="preserve">the pointer array if
20654+
@free_segment is %FALSE, otherwise %NULL. The pointer array should
20655+
be freed using g_free().</doc>
20656+
<array zero-terminated="0" c:type="gpointer*">
20657+
<type name="gpointer" c:type="gpointer"/>
20658+
</array>
2064720659
</return-value>
2064820660
<parameters>
2064920661
<parameter name="array" transfer-ownership="none">
@@ -21403,10 +21415,12 @@ g_free (chunks);
2140321415
g_assert (chunk_buffer-&gt;len == 0);
2140421416
]|</doc>
2140521417
<return-value transfer-ownership="full" nullable="1">
21406-
<doc xml:space="preserve">the element data, which should be
21407-
freed using g_free(). This may be %NULL if the array doesn&#x2019;t have any
21408-
elements (i.e. if `*len` is zero).</doc>
21409-
<type name="gpointer" c:type="gpointer*"/>
21418+
<doc xml:space="preserve">the element data,
21419+
which should be freed using g_free(). This may be %NULL if the array
21420+
doesn&#x2019;t have any elements (i.e. if `*len` is zero).</doc>
21421+
<array length="1" zero-terminated="0" c:type="gpointer*">
21422+
<type name="gpointer" c:type="gpointer"/>
21423+
</array>
2141021424
</return-value>
2141121425
<parameters>
2141221426
<parameter name="array" transfer-ownership="none">
@@ -24646,8 +24660,8 @@ g_slist_insert_sorted() functions and so is rarely used on its own.</doc>
2464624660
<function name="append" c:identifier="g_slist_append" introspectable="0">
2464724661
<doc xml:space="preserve">Adds a new element on to the end of the list.
2464824662

24649-
The return value is the new start of the list, which may
24650-
have changed, so make sure you store the new value.
24663+
Note that the return value is the new start of the list
24664+
if @list was empty; make sure you store the new value.
2465124665

2465224666
Note that g_slist_append() has to traverse the entire list
2465324667
to find the end, which is inefficient when adding multiple
@@ -24667,7 +24681,7 @@ number_list = g_slist_append (number_list, GINT_TO_POINTER (27));
2466724681
number_list = g_slist_append (number_list, GINT_TO_POINTER (14));
2466824682
]|</doc>
2466924683
<return-value>
24670-
<doc xml:space="preserve">the new start of the #GSList</doc>
24684+
<doc xml:space="preserve">either @list or the new start of the #GSList if @list was %NULL</doc>
2467124685
<type name="GLib.SList" c:type="GSList*">
2467224686
<type name="gpointer" c:type="gpointer"/>
2467324687
</type>
@@ -24982,7 +24996,7 @@ the given data (starting from 0).</doc>
2498224996
<function name="insert" c:identifier="g_slist_insert" introspectable="0">
2498324997
<doc xml:space="preserve">Inserts a new element into the list at the given position.</doc>
2498424998
<return-value>
24985-
<doc xml:space="preserve">the new start of the #GSList</doc>
24999+
<doc xml:space="preserve">the (possibly changed) start of the #GSList</doc>
2498625000
<type name="GLib.SList" c:type="GSList*">
2498725001
<type name="gpointer" c:type="gpointer"/>
2498825002
</type>
@@ -25206,8 +25220,8 @@ in the #GSList (starting from 0).</doc>
2520625220
<function name="prepend" c:identifier="g_slist_prepend" introspectable="0">
2520725221
<doc xml:space="preserve">Adds a new element on to the start of the list.
2520825222

25209-
The return value is the new start of the list, which
25210-
may have changed, so make sure you store the new value.
25223+
Note that the return value is the new start of the list,
25224+
which will have changed, so make sure you store the new value.
2521125225

2521225226
|[&lt;!-- language="C" --&gt;
2521325227
// Notice that it is initialized to the empty list.
@@ -25216,7 +25230,8 @@ list = g_slist_prepend (list, "last");
2521625230
list = g_slist_prepend (list, "first");
2521725231
]|</doc>
2521825232
<return-value>
25219-
<doc xml:space="preserve">the new start of the #GSList</doc>
25233+
<doc xml:space="preserve">a pointer to the newly prepended element,
25234+
which is the new start of the #GSList</doc>
2522025235
<type name="GLib.SList" c:type="GSList*">
2522125236
<type name="gpointer" c:type="gpointer"/>
2522225237
</type>
@@ -43660,7 +43675,9 @@ The array will grow in size automatically if necessary.</doc>
4366043675
</parameter>
4366143676
<parameter name="data" transfer-ownership="none">
4366243677
<doc xml:space="preserve">the byte data to be added</doc>
43663-
<type name="guint8" c:type="const guint8*"/>
43678+
<array length="2" zero-terminated="0" c:type="const guint8*">
43679+
<type name="guint8" c:type="guint8"/>
43680+
</array>
4366443681
</parameter>
4366543682
<parameter name="len" transfer-ownership="none">
4366643683
<doc xml:space="preserve">the number of bytes to add</doc>
@@ -43673,10 +43690,13 @@ The array will grow in size automatically if necessary.</doc>
4367343690
%TRUE it frees the actual byte data. If the reference count of
4367443691
@array is greater than one, the #GByteArray wrapper is preserved but
4367543692
the size of @array will be set to zero.</doc>
43676-
<return-value transfer-ownership="none">
43677-
<doc xml:space="preserve">the element data if @free_segment is %FALSE, otherwise
43678-
%NULL. The element data should be freed using g_free().</doc>
43679-
<type name="guint8" c:type="guint8*"/>
43693+
<return-value transfer-ownership="full" nullable="1">
43694+
<doc xml:space="preserve">the element data if
43695+
@free_segment is %FALSE, otherwise %NULL. The element data
43696+
should be freed using g_free().</doc>
43697+
<array zero-terminated="0" c:type="guint8*">
43698+
<type name="guint8" c:type="guint8"/>
43699+
</array>
4368043700
</return-value>
4368143701
<parameters>
4368243702
<parameter name="array" transfer-ownership="none">
@@ -43769,7 +43789,9 @@ The array will grow in size automatically if necessary.</doc>
4376943789
</parameter>
4377043790
<parameter name="data" transfer-ownership="none">
4377143791
<doc xml:space="preserve">the byte data to be added</doc>
43772-
<type name="guint8" c:type="const guint8*"/>
43792+
<array length="2" zero-terminated="0" c:type="const guint8*">
43793+
<type name="guint8" c:type="guint8"/>
43794+
</array>
4377343795
</parameter>
4377443796
<parameter name="len" transfer-ownership="none">
4377543797
<doc xml:space="preserve">the number of bytes to add</doc>
@@ -43961,9 +43983,11 @@ user data argument.</doc>
4396143983
the underlying array is preserved for use elsewhere and returned
4396243984
to the caller.</doc>
4396343985
<return-value transfer-ownership="full">
43964-
<doc xml:space="preserve">the element data, which should be
43965-
freed using g_free().</doc>
43966-
<type name="guint8" c:type="guint8*"/>
43986+
<doc xml:space="preserve">the element data,
43987+
which should be freed using g_free().</doc>
43988+
<array length="1" zero-terminated="0" c:type="guint8*">
43989+
<type name="guint8" c:type="guint8"/>
43990+
</array>
4396743991
</return-value>
4396843992
<parameters>
4396943993
<parameter name="array" transfer-ownership="none">
@@ -44991,7 +45015,7 @@ somewhere in the current program (or its libraries).
4499145015

4499245016
You can make critical warnings fatal at runtime by
4499345017
setting the `G_DEBUG` environment variable (see
44994-
[Running GLib Applications](glib-running.html)):
45018+
[Running GLib Applications](running.html)):
4499545019

4499645020
```
4499745021
G_DEBUG=fatal-warnings gdb ./my-program
@@ -49399,6 +49423,40 @@ This has no effect if structured logging is enabled; see
4939949423
</parameter>
4940049424
</parameters>
4940149425
</function>
49426+
<function name="log_get_always_fatal" c:identifier="g_log_get_always_fatal" version="2.86">
49427+
<doc xml:space="preserve">Gets the current fatal mask.
49428+
49429+
This is mostly used by custom log writers to make fatal messages
49430+
(`fatal-warnings`, `fatal-criticals`) work as expected, when using the
49431+
`G_DEBUG` environment variable (see [Running GLib Applications](running.html)).
49432+
49433+
An example usage is shown below:
49434+
49435+
```c
49436+
static GLogWriterOutput
49437+
my_custom_log_writer_fn (GLogLevelFlags log_level,
49438+
const GLogField *fields,
49439+
gsize n_fields,
49440+
gpointer user_data)
49441+
{
49442+
49443+
// abort if the message was fatal
49444+
if (log_level &amp; g_log_get_always_fatal ())
49445+
g_abort ();
49446+
49447+
// custom log handling code
49448+
...
49449+
...
49450+
49451+
// success
49452+
return G_LOG_WRITER_HANDLED;
49453+
}
49454+
```</doc>
49455+
<return-value transfer-ownership="none">
49456+
<doc xml:space="preserve">the current fatal mask</doc>
49457+
<type name="LogLevelFlags" c:type="GLogLevelFlags"/>
49458+
</return-value>
49459+
</function>
4940249460
<function name="log_get_debug_enabled" c:identifier="g_log_get_debug_enabled" version="2.72">
4940349461
<doc xml:space="preserve">Return whether debug output from the GLib logging system is enabled.
4940449462

@@ -49443,7 +49501,7 @@ You can only set the levels defined by GLib to be fatal.
4944349501

4944449502
You can also make some message levels fatal at runtime by setting
4944549503
the `G_DEBUG` environment variable (see
49446-
[Running GLib Applications](glib-running.html)).
49504+
[Running GLib Applications](running.html)).
4944749505

4944849506
Libraries should not call this function, as it affects all messages logged
4944949507
by a process, including those from other libraries.
@@ -51353,7 +51411,7 @@ If "[P]roceed" is selected, the function returns.
5135351411
This function may cause different actions on non-UNIX platforms.
5135451412

5135551413
On Windows consider using the `G_DEBUGGER` environment
51356-
variable (see [Running GLib Applications](glib-running.html)) and
51414+
variable (see [Running GLib Applications](running.html)) and
5135751415
calling g_on_error_stack_trace() instead.</doc>
5135851416
<return-value transfer-ownership="none">
5135951417
<type name="none" c:type="void"/>
@@ -51381,7 +51439,7 @@ When running on Windows, this function is *not* called by
5138151439
g_on_error_query(). If called directly, it will raise an
5138251440
exception, which will crash the program. If the `G_DEBUGGER` environment
5138351441
variable is set, a debugger will be invoked to attach and
51384-
handle that exception (see [Running GLib Applications](glib-running.html)).</doc>
51442+
handle that exception (see [Running GLib Applications](running.html)).</doc>
5138551443
<return-value transfer-ownership="none">
5138651444
<type name="none" c:type="void"/>
5138751445
</return-value>
@@ -62215,7 +62273,7 @@ parameters) then you should use [flags@GLib.LogLevelFlags.LEVEL_CRITICAL] instea
6221562273

6221662274
You can make warnings fatal at runtime by setting the `G_DEBUG`
6221762275
environment variable (see
62218-
[Running GLib Applications](glib-running.html)):
62276+
[Running GLib Applications](running.html)):
6221962277

6222062278
```
6222162279
G_DEBUG=fatal-warnings gdb ./my-program

GObject-2.0.gir

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7340,7 +7340,14 @@ should not destroy the object in the normal way.</doc>
73407340
<doc xml:space="preserve">Releases all references to other objects. This can be used to break
73417341
reference cycles.
73427342

7343-
This function should only be called from object system implementations.</doc>
7343+
This function should only be called from object system implementations.
7344+
7345+
This function temporarily acquires another strong reference while running
7346+
dispose.
7347+
7348+
This first clears all #GWeakRef pointers and then calls
7349+
#GObjectClass.dispose. (Before 2.86, #GWeakRef pointers were
7350+
cleared after #GObjectClass.dispose).</doc>
73447351
<return-value transfer-ownership="none">
73457352
<type name="none" c:type="void"/>
73467353
</return-value>
@@ -14395,15 +14402,19 @@ reference is thread-safe: converting a weak pointer to a reference is
1439514402
atomic with respect to invalidation of weak pointers to destroyed
1439614403
objects.
1439714404

14405+
#GWeakRefs are reset before calling #GObjectClass.dispose.
1439814406
If the object's #GObjectClass.dispose method results in additional
1439914407
references to the object being held (&#x2018;re-referencing&#x2019;), any #GWeakRefs taken
14400-
before it was disposed will continue to point to %NULL. Any #GWeakRefs taken
14401-
during disposal and after re-referencing, or after disposal has returned due
14402-
to the re-referencing, will continue to point to the object until its refcount
14403-
goes back to zero, at which point they too will be invalidated.
14404-
14405-
It is invalid to take a #GWeakRef on an object during #GObjectClass.dispose
14406-
without first having or creating a strong reference to the object.</doc>
14408+
before it was disposed will continue to point to %NULL. If during disposal
14409+
the object gets re-referenced and resurrected, the #GWeakRefs taken during
14410+
disposal will be set until the reference count drops towards zero again and
14411+
#GObjectClass.dispose is called again. If #GWeakRefs were taken during
14412+
disposal but the object not resurrected, they will be set to %NULL right
14413+
after, before finalization.
14414+
14415+
Note that #GObjectClass.run_dispose() also resets #GWeakRefs. As such, the
14416+
#GWeakRef actually tracks whether #GObjectClass.dispose() was called
14417+
and not the reference count reaching zero.</doc>
1440714418
<union name="priv" c:type="priv">
1440814419
<field name="p" writable="1">
1440914420
<type name="gpointer" c:type="gpointer"/>

0 commit comments

Comments
 (0)