@@ -2870,7 +2870,9 @@ The array will grow in size automatically if necessary.</doc>
2870
2870
</parameter>
2871
2871
<parameter name="data" transfer-ownership="none">
2872
2872
<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>
2874
2876
</parameter>
2875
2877
<parameter name="len" transfer-ownership="none">
2876
2878
<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>
2883
2885
%TRUE it frees the actual byte data. If the reference count of
2884
2886
@array is greater than one, the #GByteArray wrapper is preserved but
2885
2887
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>
2890
2895
</return-value>
2891
2896
<parameters>
2892
2897
<parameter name="array" transfer-ownership="none">
@@ -2979,7 +2984,9 @@ The array will grow in size automatically if necessary.</doc>
2979
2984
</parameter>
2980
2985
<parameter name="data" transfer-ownership="none">
2981
2986
<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>
2983
2990
</parameter>
2984
2991
<parameter name="len" transfer-ownership="none">
2985
2992
<doc xml:space="preserve">the number of bytes to add</doc>
@@ -3171,9 +3178,11 @@ user data argument.</doc>
3171
3178
the underlying array is preserved for use elsewhere and returned
3172
3179
to the caller.</doc>
3173
3180
<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>
3177
3186
</return-value>
3178
3187
<parameters>
3179
3188
<parameter name="array" transfer-ownership="none">
@@ -20641,9 +20650,12 @@ This function is not thread-safe. If using a #GPtrArray from multiple
20641
20650
threads, use only the atomic g_ptr_array_ref() and g_ptr_array_unref()
20642
20651
functions.</doc>
20643
20652
<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>
20647
20659
</return-value>
20648
20660
<parameters>
20649
20661
<parameter name="array" transfer-ownership="none">
@@ -21403,10 +21415,12 @@ g_free (chunks);
21403
21415
g_assert (chunk_buffer->len == 0);
21404
21416
]|</doc>
21405
21417
<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’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’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>
21410
21424
</return-value>
21411
21425
<parameters>
21412
21426
<parameter name="array" transfer-ownership="none">
@@ -24646,8 +24660,8 @@ g_slist_insert_sorted() functions and so is rarely used on its own.</doc>
24646
24660
<function name="append" c:identifier="g_slist_append" introspectable="0">
24647
24661
<doc xml:space="preserve">Adds a new element on to the end of the list.
24648
24662
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.
24651
24665
24652
24666
Note that g_slist_append() has to traverse the entire list
24653
24667
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));
24667
24681
number_list = g_slist_append (number_list, GINT_TO_POINTER (14));
24668
24682
]|</doc>
24669
24683
<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>
24671
24685
<type name="GLib.SList" c:type="GSList*">
24672
24686
<type name="gpointer" c:type="gpointer"/>
24673
24687
</type>
@@ -24982,7 +24996,7 @@ the given data (starting from 0).</doc>
24982
24996
<function name="insert" c:identifier="g_slist_insert" introspectable="0">
24983
24997
<doc xml:space="preserve">Inserts a new element into the list at the given position.</doc>
24984
24998
<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>
24986
25000
<type name="GLib.SList" c:type="GSList*">
24987
25001
<type name="gpointer" c:type="gpointer"/>
24988
25002
</type>
@@ -25206,8 +25220,8 @@ in the #GSList (starting from 0).</doc>
25206
25220
<function name="prepend" c:identifier="g_slist_prepend" introspectable="0">
25207
25221
<doc xml:space="preserve">Adds a new element on to the start of the list.
25208
25222
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.
25211
25225
25212
25226
|[<!-- language="C" -->
25213
25227
// Notice that it is initialized to the empty list.
@@ -25216,7 +25230,8 @@ list = g_slist_prepend (list, "last");
25216
25230
list = g_slist_prepend (list, "first");
25217
25231
]|</doc>
25218
25232
<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>
25220
25235
<type name="GLib.SList" c:type="GSList*">
25221
25236
<type name="gpointer" c:type="gpointer"/>
25222
25237
</type>
@@ -43660,7 +43675,9 @@ The array will grow in size automatically if necessary.</doc>
43660
43675
</parameter>
43661
43676
<parameter name="data" transfer-ownership="none">
43662
43677
<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>
43664
43681
</parameter>
43665
43682
<parameter name="len" transfer-ownership="none">
43666
43683
<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>
43673
43690
%TRUE it frees the actual byte data. If the reference count of
43674
43691
@array is greater than one, the #GByteArray wrapper is preserved but
43675
43692
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>
43680
43700
</return-value>
43681
43701
<parameters>
43682
43702
<parameter name="array" transfer-ownership="none">
@@ -43769,7 +43789,9 @@ The array will grow in size automatically if necessary.</doc>
43769
43789
</parameter>
43770
43790
<parameter name="data" transfer-ownership="none">
43771
43791
<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>
43773
43795
</parameter>
43774
43796
<parameter name="len" transfer-ownership="none">
43775
43797
<doc xml:space="preserve">the number of bytes to add</doc>
@@ -43961,9 +43983,11 @@ user data argument.</doc>
43961
43983
the underlying array is preserved for use elsewhere and returned
43962
43984
to the caller.</doc>
43963
43985
<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>
43967
43991
</return-value>
43968
43992
<parameters>
43969
43993
<parameter name="array" transfer-ownership="none">
@@ -44991,7 +45015,7 @@ somewhere in the current program (or its libraries).
44991
45015
44992
45016
You can make critical warnings fatal at runtime by
44993
45017
setting the `G_DEBUG` environment variable (see
44994
- [Running GLib Applications](glib- running.html)):
45018
+ [Running GLib Applications](running.html)):
44995
45019
44996
45020
```
44997
45021
G_DEBUG=fatal-warnings gdb ./my-program
@@ -49399,6 +49423,40 @@ This has no effect if structured logging is enabled; see
49399
49423
</parameter>
49400
49424
</parameters>
49401
49425
</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 & 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>
49402
49460
<function name="log_get_debug_enabled" c:identifier="g_log_get_debug_enabled" version="2.72">
49403
49461
<doc xml:space="preserve">Return whether debug output from the GLib logging system is enabled.
49404
49462
@@ -49443,7 +49501,7 @@ You can only set the levels defined by GLib to be fatal.
49443
49501
49444
49502
You can also make some message levels fatal at runtime by setting
49445
49503
the `G_DEBUG` environment variable (see
49446
- [Running GLib Applications](glib- running.html)).
49504
+ [Running GLib Applications](running.html)).
49447
49505
49448
49506
Libraries should not call this function, as it affects all messages logged
49449
49507
by a process, including those from other libraries.
@@ -51353,7 +51411,7 @@ If "[P]roceed" is selected, the function returns.
51353
51411
This function may cause different actions on non-UNIX platforms.
51354
51412
51355
51413
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
51357
51415
calling g_on_error_stack_trace() instead.</doc>
51358
51416
<return-value transfer-ownership="none">
51359
51417
<type name="none" c:type="void"/>
@@ -51381,7 +51439,7 @@ When running on Windows, this function is *not* called by
51381
51439
g_on_error_query(). If called directly, it will raise an
51382
51440
exception, which will crash the program. If the `G_DEBUGGER` environment
51383
51441
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>
51385
51443
<return-value transfer-ownership="none">
51386
51444
<type name="none" c:type="void"/>
51387
51445
</return-value>
@@ -62215,7 +62273,7 @@ parameters) then you should use [flags@GLib.LogLevelFlags.LEVEL_CRITICAL] instea
62215
62273
62216
62274
You can make warnings fatal at runtime by setting the `G_DEBUG`
62217
62275
environment variable (see
62218
- [Running GLib Applications](glib- running.html)):
62276
+ [Running GLib Applications](running.html)):
62219
62277
62220
62278
```
62221
62279
G_DEBUG=fatal-warnings gdb ./my-program
0 commit comments