@revizly/sharp-libvips-dev 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/cplusplus/VImage.cpp +18 -2
  2. package/cplusplus/vips-operators.cpp +79 -3
  3. package/include/aom/aom.h +1 -1
  4. package/include/aom/aom_codec.h +22 -5
  5. package/include/aom/aom_decoder.h +1 -1
  6. package/include/aom/aom_encoder.h +5 -1
  7. package/include/aom/aom_external_partition.h +1 -1
  8. package/include/aom/aom_frame_buffer.h +1 -1
  9. package/include/aom/aom_image.h +4 -2
  10. package/include/aom/aom_integer.h +1 -9
  11. package/include/aom/aomcx.h +64 -9
  12. package/include/aom/aomdx.h +1 -1
  13. package/include/archive.h +2 -2
  14. package/include/archive_entry.h +7 -1
  15. package/include/cairo/cairo-version.h +1 -1
  16. package/include/expat.h +4 -2
  17. package/include/expat_config.h +3 -6
  18. package/include/fribidi/fribidi-config.h +2 -2
  19. package/include/fribidi/fribidi-unicode-version.h +3 -3
  20. package/include/gio-unix-2.0/gio/gunixmounts.h +97 -23
  21. package/include/glib-2.0/gio/gfile.h +4 -0
  22. package/include/glib-2.0/gio/gio-visibility.h +34 -0
  23. package/include/glib-2.0/gio/gioenums.h +2 -2
  24. package/include/glib-2.0/gio/gresource.h +6 -0
  25. package/include/glib-2.0/girepository/gi-visibility.h +34 -0
  26. package/include/glib-2.0/girepository/gicallableinfo.h +12 -0
  27. package/include/glib-2.0/girepository/gitypes.h +1 -0
  28. package/include/glib-2.0/glib/garray.h +1 -1
  29. package/include/glib-2.0/glib/glib-visibility.h +34 -0
  30. package/include/glib-2.0/glib/gmacros.h +2 -0
  31. package/include/glib-2.0/glib/gmain.h +130 -47
  32. package/include/glib-2.0/glib/gmem.h +3 -0
  33. package/include/glib-2.0/glib/grefstring.h +4 -0
  34. package/include/glib-2.0/glib/gstdio.h +65 -0
  35. package/include/glib-2.0/glib/gstrfuncs.h +4 -0
  36. package/include/glib-2.0/glib/gstring.h +4 -0
  37. package/include/glib-2.0/glib/gunicode.h +17 -1
  38. package/include/glib-2.0/glib/gvariant.h +50 -13
  39. package/include/glib-2.0/glib/gvarianttype.h +62 -46
  40. package/include/glib-2.0/glib/gversionmacros.h +9 -0
  41. package/include/glib-2.0/glib-unix.h +21 -0
  42. package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
  43. package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
  44. package/include/glib-2.0/gobject/gobjectnotifyqueue.c +3 -3
  45. package/include/harfbuzz/hb-buffer.h +7 -0
  46. package/include/harfbuzz/hb-common.h +18 -0
  47. package/include/harfbuzz/hb-draw.h +1 -1
  48. package/include/harfbuzz/hb-face.h +36 -0
  49. package/include/harfbuzz/hb-ft.h +3 -0
  50. package/include/harfbuzz/hb-version.h +3 -3
  51. package/include/libheif/heif.h +322 -26
  52. package/include/libheif/heif_properties.h +24 -4
  53. package/include/libheif/heif_version.h +2 -2
  54. package/include/libpng16/png.h +13 -13
  55. package/include/libpng16/pngconf.h +4 -4
  56. package/include/libpng16/pnglibconf.h +1 -1
  57. package/include/librsvg-2.0/librsvg/rsvg-version.h +3 -3
  58. package/include/librsvg-2.0/librsvg/rsvg.h +2 -0
  59. package/include/libxml2/libxml/xmlexports.h +2 -2
  60. package/include/libxml2/libxml/xmlversion.h +4 -4
  61. package/include/pixman-1/pixman-version.h +3 -3
  62. package/include/png.h +13 -13
  63. package/include/pngconf.h +4 -4
  64. package/include/pnglibconf.h +1 -1
  65. package/include/tiffio.h +11 -11
  66. package/include/tiffvers.h +4 -4
  67. package/include/vips/VImage8.h +170 -60
  68. package/include/vips/arithmetic.h +9 -0
  69. package/include/vips/basic.h +8 -4
  70. package/include/vips/buf.h +0 -2
  71. package/include/vips/connection.h +0 -2
  72. package/include/vips/conversion.h +0 -3
  73. package/include/vips/create.h +11 -0
  74. package/include/vips/enumtypes.h +3 -3
  75. package/include/vips/foreign.h +4 -18
  76. package/include/vips/header.h +7 -0
  77. package/include/vips/image.h +7 -2
  78. package/include/vips/interpolate.h +2 -3
  79. package/include/vips/memory.h +19 -1
  80. package/include/vips/operation.h +2 -7
  81. package/include/vips/private.h +7 -0
  82. package/include/vips/util.h +6 -15
  83. package/include/vips/version.h +8 -8
  84. package/include/vips/vips.h +11 -5
  85. package/include/vips/vips8 +19 -12
  86. package/include/zlib.h +3 -3
  87. package/package.json +1 -1
  88. package/versions.json +15 -15
@@ -48,8 +48,8 @@ typedef enum /*< flags >*/
48
48
  * `g_main_context_{prepare,query,check,dispatch}` to integrate GMainContext in
49
49
  * other event loops.
50
50
  *
51
- * Flags to pass to g_main_context_new_with_flags() which affect the behaviour
52
- * of a #GMainContext.
51
+ * Flags to pass to [ctor@GLib.MainContext.new_with_flags] which affect the
52
+ * behaviour of a [struct@GLib.MainContext].
53
53
  *
54
54
  * Since: 2.72
55
55
  */
@@ -121,15 +121,17 @@ typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs;
121
121
  * %TRUE in either its @prepare or its @check function, or if a ready time
122
122
  * has been reached. The @dispatch function receives a callback function and
123
123
  * user data. The callback function may be %NULL if the source was never
124
- * connected to a callback using g_source_set_callback(). The @dispatch
125
- * function should call the callback function with @user_data and whatever
126
- * additional parameters are needed for this type of event source. The
127
- * return value of the @dispatch function should be %G_SOURCE_REMOVE if the
128
- * source should be removed or %G_SOURCE_CONTINUE to keep it.
124
+ * connected to a callback using [method@GLib.Source.set_callback]. The
125
+ * @dispatch function should call the callback function with @user_data and
126
+ * whatever additional parameters are needed for this type of event source.
127
+ * The return value of the @dispatch function should be
128
+ * [const@GLib.SOURCE_REMOVE] if the source should be removed or
129
+ * [const@GLib.SOURCE_CONTINUE] to keep it.
129
130
  * @finalize: Called when the source is finalized. At this point, the source
130
131
  * will have been destroyed, had its callback cleared, and have been removed
131
- * from its #GMainContext, but it will still have its final reference count,
132
- * so methods can be called on it from within this function.
132
+ * from its [struct@GLib.MainContext], but it will still have its final
133
+ * reference count, so methods can be called on it from within this
134
+ * function.
133
135
  *
134
136
  * The `GSourceFuncs` struct contains a table of
135
137
  * functions used to handle event sources in a generic manner.
@@ -182,15 +184,17 @@ typedef struct _GSourceFuncs GSourceFuncs;
182
184
  * @user_data: data passed to the function, set when the source was
183
185
  * created with one of the above functions
184
186
  *
185
- * Specifies the type of function passed to g_timeout_add(),
186
- * g_timeout_add_full(), g_idle_add(), and g_idle_add_full().
187
+ * Specifies the type of function passed to [func@GLib.timeout_add],
188
+ * [func@GLib.timeout_add_full], [func@GLib.idle_add], and
189
+ * [func@GLib.idle_add_full].
187
190
  *
188
- * When calling g_source_set_callback(), you may need to cast a function of a
189
- * different type to this type. Use G_SOURCE_FUNC() to avoid warnings about
190
- * incompatible function types.
191
+ * When calling [method@GLib.Source.set_callback], you may need to cast a
192
+ * function of a different type to this type. Use [func@GLib.SOURCE_FUNC] to
193
+ * avoid warnings about incompatible function types.
191
194
  *
192
- * Returns: %FALSE if the source should be removed. %G_SOURCE_CONTINUE and
193
- * %G_SOURCE_REMOVE are more memorable names for the return value.
195
+ * Returns: %FALSE if the source should be removed.
196
+ * [const@GLib.SOURCE_CONTINUE] and [const@GLib.SOURCE_REMOVE] are more
197
+ * memorable names for the return value.
194
198
  */
195
199
  typedef gboolean (*GSourceFunc) (gpointer user_data);
196
200
 
@@ -202,7 +206,7 @@ typedef gboolean (*GSourceFunc) (gpointer user_data);
202
206
  * A source function that is only called once before being removed from the main
203
207
  * context automatically.
204
208
  *
205
- * See: g_idle_add_once(), g_timeout_add_once()
209
+ * See: [func@GLib.idle_add_once], [func@GLib.timeout_add_once]
206
210
  *
207
211
  * Since: 2.74
208
212
  */
@@ -212,15 +216,16 @@ typedef void (* GSourceOnceFunc) (gpointer user_data);
212
216
  * G_SOURCE_FUNC:
213
217
  * @f: a function pointer.
214
218
  *
215
- * Cast a function pointer to a #GSourceFunc, suppressing warnings from GCC 8
216
- * onwards with `-Wextra` or `-Wcast-function-type` enabled about the function
217
- * types being incompatible.
219
+ * Cast a function pointer to a [callback@GLib.SourceFunc], suppressing
220
+ * warnings from GCC 8 onwards with `-Wextra` or `-Wcast-function-type` enabled
221
+ * about the function types being incompatible.
218
222
  *
219
223
  * For example, the correct type of callback for a source created by
220
- * g_child_watch_source_new() is #GChildWatchFunc, which accepts more arguments
221
- * than #GSourceFunc. Casting the function with `(GSourceFunc)` to call
222
- * g_source_set_callback() will trigger a warning, even though it will be cast
223
- * back to the correct type before it is called by the source.
224
+ * [func@GLib.child_watch_source_new] is #GChildWatchFunc, which accepts more
225
+ * arguments than [callback@GLib.SourceFunc]. Casting the function with
226
+ * `(GSourceFunc)` to call [method@GLib.Source.set_callback] will trigger a
227
+ * warning, even though it will be cast back to the correct type before it is
228
+ * called by the source.
224
229
  *
225
230
  * Since: 2.58
226
231
  */
@@ -231,13 +236,13 @@ typedef void (* GSourceOnceFunc) (gpointer user_data);
231
236
  * @pid: the process id of the child process
232
237
  * @wait_status: Status information about the child process, encoded
233
238
  * in a platform-specific manner
234
- * @user_data: user data passed to g_child_watch_add()
239
+ * @user_data: user data passed to [func@GLib.child_watch_add]
235
240
  *
236
241
  * Prototype of a #GChildWatchSource callback, called when a child
237
242
  * process has exited.
238
243
  *
239
- * To interpret @wait_status, see the documentation
240
- * for g_spawn_check_wait_status(). In particular,
244
+ * To interpret @wait_status, see the documentation for
245
+ * [func@GLib.spawn_check_wait_status]. In particular,
241
246
  * on Unix platforms, note that it is usually not equal
242
247
  * to the integer passed to `exit()` or returned from `main()`.
243
248
  */
@@ -250,8 +255,8 @@ typedef void (*GChildWatchFunc) (GPid pid,
250
255
  * GSourceDisposeFunc:
251
256
  * @source: #GSource that is currently being disposed
252
257
  *
253
- * Dispose function for @source. See g_source_set_dispose_function() for
254
- * details.
258
+ * Dispose function for @source. See [method@GLib.Source.set_dispose_function]
259
+ * for details.
255
260
  *
256
261
  * Since: 2.64
257
262
  */
@@ -420,7 +425,7 @@ struct _GSourceFuncs
420
425
  * Use this for default priority event sources.
421
426
  *
422
427
  * In GLib this priority is used when adding timeout functions
423
- * with g_timeout_add(). In GDK this priority is used for events
428
+ * with [func@GLib.timeout_add]. In GDK this priority is used for events
424
429
  * from the X server.
425
430
  */
426
431
  #define G_PRIORITY_DEFAULT 0
@@ -443,7 +448,7 @@ struct _GSourceFuncs
443
448
  * Use this for default priority idle functions.
444
449
  *
445
450
  * In GLib this priority is used when adding idle functions with
446
- * g_idle_add().
451
+ * [func@GLib.idle_add].
447
452
  */
448
453
  #define G_PRIORITY_DEFAULT_IDLE 200
449
454
 
@@ -459,8 +464,8 @@ struct _GSourceFuncs
459
464
  /**
460
465
  * G_SOURCE_REMOVE:
461
466
  *
462
- * Use this macro as the return value of a #GSourceFunc to remove
463
- * the #GSource from the main loop.
467
+ * Use this macro as the return value of a [callback@GLib.SourceFunc] to remove
468
+ * the [struct@GLib.Source] from the main loop.
464
469
  *
465
470
  * Since: 2.32
466
471
  */
@@ -469,8 +474,8 @@ struct _GSourceFuncs
469
474
  /**
470
475
  * G_SOURCE_CONTINUE:
471
476
  *
472
- * Use this macro as the return value of a #GSourceFunc to leave
473
- * the #GSource in the main loop.
477
+ * Use this macro as the return value of a [callback@GLib.SourceFunc] to leave
478
+ * the [struct@GLib.Source] in the main loop.
474
479
  *
475
480
  * Since: 2.32
476
481
  */
@@ -588,13 +593,13 @@ typedef void GMainContextPusher GLIB_AVAILABLE_TYPE_IN_2_64;
588
593
  * @main_context: (transfer none): a main context to push
589
594
  *
590
595
  * Push @main_context as the new thread-default main context for the current
591
- * thread, using g_main_context_push_thread_default(), and return a new
592
- * #GMainContextPusher. Pop with g_main_context_pusher_free(). Using
593
- * g_main_context_pop_thread_default() on @main_context while a
594
- * #GMainContextPusher exists for it can lead to undefined behaviour.
596
+ * thread, using [method@GLib.MainContext.push_thread_default], and return a
597
+ * new [alias@GLib.MainContextPusher]. Pop with g_main_context_pusher_free().
598
+ * Using [method@GLib.MainContext.pop_thread_default] on @main_context while a
599
+ * [alias@GLib.MainContextPusher] exists for it can lead to undefined behaviour.
595
600
  *
596
- * Using two #GMainContextPushers in the same scope is not allowed, as it leads
597
- * to an undefined pop order.
601
+ * Using two [alias@GLib.MainContextPusher]s in the same scope is not allowed,
602
+ * as it leads to an undefined pop order.
598
603
  *
599
604
  * This is intended to be used with g_autoptr(). Note that g_autoptr()
600
605
  * is only available when using GCC or clang, so the following example
@@ -629,6 +634,9 @@ typedef void GMainContextPusher GLIB_AVAILABLE_TYPE_IN_2_64;
629
634
  * Since: 2.64
630
635
  */
631
636
  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
637
+ GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
638
+ static inline GMainContextPusher *g_main_context_pusher_new (GMainContext *main_context);
639
+
632
640
  GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
633
641
  static inline GMainContextPusher *
634
642
  g_main_context_pusher_new (GMainContext *main_context)
@@ -645,12 +653,15 @@ G_GNUC_END_IGNORE_DEPRECATIONS
645
653
  * Pop @pusher’s main context as the thread default main context.
646
654
  * See g_main_context_pusher_new() for details.
647
655
  *
648
- * This will pop the #GMainContext as the current thread-default main context,
649
- * but will not call g_main_context_unref() on it.
656
+ * This will pop the [struct@GLib.MainContext] as the current thread-default
657
+ * main context, but will not call [method@GLib.MainContext.unref] on it.
650
658
  *
651
659
  * Since: 2.64
652
660
  */
653
661
  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
662
+ GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
663
+ static inline void g_main_context_pusher_free (GMainContextPusher *pusher);
664
+
654
665
  GLIB_AVAILABLE_STATIC_INLINE_IN_2_64
655
666
  static inline void
656
667
  g_main_context_pusher_free (GMainContextPusher *pusher)
@@ -833,10 +844,10 @@ gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs,
833
844
  * GClearHandleFunc:
834
845
  * @handle_id: the handle ID to clear
835
846
  *
836
- * Specifies the type of function passed to g_clear_handle_id().
837
- * The implementation is expected to free the resource identified
838
- * by @handle_id; for instance, if @handle_id is a #GSource ID,
839
- * g_source_remove() can be used.
847
+ * Specifies the type of function passed to [func@GLib.clear_handle_id] The
848
+ * implementation is expected to free the resource identified by @handle_id;
849
+ * for instance, if @handle_id is a [struct@GLib.Source] ID,
850
+ * [func@GLib.Source.remove] can be used.
840
851
  *
841
852
  * Since: 2.56
842
853
  */
@@ -861,6 +872,54 @@ void g_clear_handle_id (guint *tag_ptr,
861
872
  } G_STMT_END \
862
873
  GLIB_AVAILABLE_MACRO_IN_2_56
863
874
 
875
+ /**
876
+ * g_steal_handle_id:
877
+ * @handle_pointer: (inout) (not optional): a pointer to a handle ID
878
+ *
879
+ * Sets @handle_pointer to `0`, returning the value that was there before.
880
+ *
881
+ * Conceptually, this transfers the ownership of the handle ID from the
882
+ * referenced variable to the ‘caller’ of the macro (ie: ‘steals’ the
883
+ * handle ID).
884
+ *
885
+ * This can be very useful to make ownership transfer explicit, or to prevent
886
+ * a handle from being released multiple times. For example:
887
+ *
888
+ * ```c
889
+ * void
890
+ * maybe_unsubscribe_signal (ContextStruct *data)
891
+ * {
892
+ * if (some_complex_logic (data))
893
+ * {
894
+ * g_dbus_connection_signal_unsubscribe (data->connection,
895
+ * g_steal_handle_id (&data->subscription_id));
896
+ * // now data->subscription_id isn’t a dangling handle
897
+ * }
898
+ * }
899
+ * ```
900
+ *
901
+ * While [func@GLib.clear_handle_id] can be used in many of the same situations
902
+ * as `g_steal_handle_id()`, this is one situation where it cannot be used, as
903
+ * there is no way to pass the `GDBusConnection` to a
904
+ * [type@GLib.ClearHandleFunc].
905
+ *
906
+ * Since: 2.84
907
+ */
908
+ GLIB_AVAILABLE_STATIC_INLINE_IN_2_84
909
+ static inline unsigned int g_steal_handle_id (unsigned int *handle_pointer);
910
+
911
+ GLIB_AVAILABLE_STATIC_INLINE_IN_2_84
912
+ static inline unsigned int
913
+ g_steal_handle_id (unsigned int *handle_pointer)
914
+ {
915
+ unsigned int handle;
916
+
917
+ handle = *handle_pointer;
918
+ *handle_pointer = 0;
919
+
920
+ return handle;
921
+ }
922
+
864
923
  /* Idles, child watchers and timeouts */
865
924
  GLIB_AVAILABLE_IN_ALL
866
925
  guint g_timeout_add_full (gint priority,
@@ -925,6 +984,30 @@ void g_main_context_invoke (GMainContext *context,
925
984
  GSourceFunc function,
926
985
  gpointer data);
927
986
 
987
+ /**
988
+ * g_steal_fd:
989
+ * @fd_ptr: (not optional) (inout): A pointer to a file descriptor
990
+ *
991
+ * Sets @fd_ptr to `-1`, returning the value that was there before.
992
+ *
993
+ * Conceptually, this transfers the ownership of the file descriptor
994
+ * from the referenced variable to the caller of the function (i.e.
995
+ * ‘steals’ the reference). This is very similar to [func@GLib.steal_pointer],
996
+ * but for file descriptors.
997
+ *
998
+ * On POSIX platforms, this function is async-signal safe
999
+ * (see [`signal(7)`](man:signal(7)) and
1000
+ * [`signal-safety(7)`](man:signal-safety(7))), making it safe to call from a
1001
+ * signal handler or a #GSpawnChildSetupFunc.
1002
+ *
1003
+ * This function preserves the value of `errno`.
1004
+ *
1005
+ * Returns: the value that @fd_ptr previously had
1006
+ * Since: 2.70
1007
+ */
1008
+ GLIB_AVAILABLE_STATIC_INLINE_IN_2_70
1009
+ static inline int g_steal_fd (int *fd_ptr);
1010
+
928
1011
  GLIB_AVAILABLE_STATIC_INLINE_IN_2_70
929
1012
  static inline int
930
1013
  g_steal_fd (int *fd_ptr)
@@ -229,6 +229,9 @@ void g_aligned_free_sized (gpointer mem,
229
229
  *
230
230
  * Since: 2.44
231
231
  */
232
+ GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
233
+ static inline gpointer g_steal_pointer (gpointer pp);
234
+
232
235
  GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
233
236
  static inline gpointer
234
237
  g_steal_pointer (gpointer pp)
@@ -56,4 +56,8 @@ gsize g_ref_string_length (char *str);
56
56
  */
57
57
  typedef char GRefString;
58
58
 
59
+ GLIB_AVAILABLE_IN_2_84
60
+ gboolean g_ref_string_equal (const char *str1,
61
+ const char *str2);
62
+
59
63
  G_END_DECLS
@@ -179,6 +179,71 @@ GLIB_AVAILABLE_IN_2_36
179
179
  gboolean g_close (gint fd,
180
180
  GError **error);
181
181
 
182
+ /**
183
+ * g_clear_fd: (skip)
184
+ * @fd_ptr: (not optional) (inout) (transfer full): a pointer to a file descriptor
185
+ * @error: Used to return an error on failure
186
+ *
187
+ * If @fd_ptr points to a file descriptor, close it and return
188
+ * whether closing it was successful, like g_close().
189
+ * If @fd_ptr points to a negative number, return %TRUE without closing
190
+ * anything.
191
+ * In both cases, set @fd_ptr to `-1` before returning.
192
+ *
193
+ * Like g_close(), if closing the file descriptor fails, the error is
194
+ * stored in both %errno and @error. If this function succeeds,
195
+ * %errno is undefined.
196
+ *
197
+ * On POSIX platforms, this function is async-signal safe
198
+ * if @error is %NULL and @fd_ptr points to either a negative number or a
199
+ * valid open file descriptor.
200
+ * This makes it safe to call from a signal handler or a #GSpawnChildSetupFunc
201
+ * under those conditions.
202
+ * See [`signal(7)`](man:signal(7)) and
203
+ * [`signal-safety(7)`](man:signal-safety(7)) for more details.
204
+ *
205
+ * It is a programming error for @fd_ptr to point to a non-negative
206
+ * number that is not a valid file descriptor.
207
+ *
208
+ * A typical use of this function is to clean up a file descriptor at
209
+ * the end of its scope, whether it has been set successfully or not:
210
+ *
211
+ * |[
212
+ * gboolean
213
+ * operate_on_fd (GError **error)
214
+ * {
215
+ * gboolean ret = FALSE;
216
+ * int fd = -1;
217
+ *
218
+ * fd = open_a_fd (error);
219
+ *
220
+ * if (fd < 0)
221
+ * goto out;
222
+ *
223
+ * if (!do_something (fd, error))
224
+ * goto out;
225
+ *
226
+ * if (!g_clear_fd (&fd, error))
227
+ * goto out;
228
+ *
229
+ * ret = TRUE;
230
+ *
231
+ * out:
232
+ * // OK to call even if fd was never opened or was already closed
233
+ * g_clear_fd (&fd, NULL);
234
+ * return ret;
235
+ * }
236
+ * ]|
237
+ *
238
+ * This function is also useful in conjunction with #g_autofd.
239
+ *
240
+ * Returns: %TRUE on success
241
+ * Since: 2.76
242
+ */
243
+ GLIB_AVAILABLE_STATIC_INLINE_IN_2_76
244
+ static inline gboolean g_clear_fd (int *fd_ptr,
245
+ GError **error);
246
+
182
247
  GLIB_AVAILABLE_STATIC_INLINE_IN_2_76
183
248
  static inline gboolean
184
249
  g_clear_fd (int *fd_ptr,
@@ -476,6 +476,10 @@ gboolean g_ascii_string_to_unsigned (const gchar *str,
476
476
  * Since: 2.76
477
477
  */
478
478
  GLIB_AVAILABLE_STATIC_INLINE_IN_2_76
479
+ static inline gboolean g_set_str (char **str_pointer,
480
+ const char *new_str);
481
+
482
+ GLIB_AVAILABLE_STATIC_INLINE_IN_2_76
479
483
  static inline gboolean
480
484
  g_set_str (char **str_pointer,
481
485
  const char *new_str)
@@ -66,6 +66,8 @@ gchar* g_string_free_and_steal (GString *string) G_GNUC_WARN_UN
66
66
 
67
67
  #if G_GNUC_CHECK_VERSION (2, 0) && (GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76)
68
68
 
69
+ #if !defined(__cplusplus) || !G_GNUC_CHECK_VERSION (6, 1) || G_GNUC_CHECK_VERSION (7, 3)
70
+
69
71
  #define g_string_free(str, free_segment) \
70
72
  (__builtin_constant_p (free_segment) ? \
71
73
  ((free_segment) ? \
@@ -74,6 +76,8 @@ gchar* g_string_free_and_steal (GString *string) G_GNUC_WARN_UN
74
76
  : \
75
77
  (g_string_free) ((str), (free_segment)))
76
78
 
79
+ #endif /* !defined(__cplusplus) || !G_GNUC_CHECK_VERSION (6, 1) || G_GNUC_CHECK_VERSION (7, 3) */
80
+
77
81
  #endif /* G_GNUC_CHECK_VERSION (2, 0) && (GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_76) */
78
82
 
79
83
  GLIB_AVAILABLE_IN_2_34
@@ -450,6 +450,13 @@ typedef enum
450
450
  * @G_UNICODE_SCRIPT_MATH: Mathematical notation. Since: 2.72
451
451
  * @G_UNICODE_SCRIPT_KAWI: Kawi. Since 2.74
452
452
  * @G_UNICODE_SCRIPT_NAG_MUNDARI: Nag Mundari. Since 2.74
453
+ * @G_UNICODE_SCRIPT_TODHRI: Todhri. Since: 2.84
454
+ * @G_UNICODE_SCRIPT_GARAY: Garay. Since: 2.84
455
+ * @G_UNICODE_SCRIPT_TULU_TIGALARI: Tulu-Tigalari. Since: 2.84
456
+ * @G_UNICODE_SCRIPT_SUNUWAR: Sunuwar. Since: 2.84
457
+ * @G_UNICODE_SCRIPT_GURUNG_KHEMA: Gurung Khema. Since: 2.84
458
+ * @G_UNICODE_SCRIPT_KIRAT_RAI: Kirat Rai. Since: 2.84
459
+ * @G_UNICODE_SCRIPT_OL_ONAL: Ol Onal. Since: 2.84
453
460
  *
454
461
  * The #GUnicodeScript enumeration identifies different writing
455
462
  * systems. The values correspond to the names as defined in the
@@ -661,7 +668,16 @@ typedef enum
661
668
 
662
669
  /* Unicode 15.0 additions */
663
670
  G_UNICODE_SCRIPT_KAWI GLIB_AVAILABLE_ENUMERATOR_IN_2_74, /* Kawi */
664
- G_UNICODE_SCRIPT_NAG_MUNDARI GLIB_AVAILABLE_ENUMERATOR_IN_2_74, /* Nag Mundari */
671
+ G_UNICODE_SCRIPT_NAG_MUNDARI GLIB_AVAILABLE_ENUMERATOR_IN_2_74, /* Nagm */
672
+
673
+ /* Unicode 16.0 additions */
674
+ G_UNICODE_SCRIPT_TODHRI GLIB_AVAILABLE_ENUMERATOR_IN_2_84, /* Todr */
675
+ G_UNICODE_SCRIPT_GARAY GLIB_AVAILABLE_ENUMERATOR_IN_2_84, /* Gara */
676
+ G_UNICODE_SCRIPT_TULU_TIGALARI GLIB_AVAILABLE_ENUMERATOR_IN_2_84, /* Tutg */
677
+ G_UNICODE_SCRIPT_SUNUWAR GLIB_AVAILABLE_ENUMERATOR_IN_2_84, /* Sunu */
678
+ G_UNICODE_SCRIPT_GURUNG_KHEMA GLIB_AVAILABLE_ENUMERATOR_IN_2_84, /* Gukh */
679
+ G_UNICODE_SCRIPT_KIRAT_RAI GLIB_AVAILABLE_ENUMERATOR_IN_2_84, /* Krai */
680
+ G_UNICODE_SCRIPT_OL_ONAL GLIB_AVAILABLE_ENUMERATOR_IN_2_84, /* Onao */
665
681
  } GUnicodeScript;
666
682
 
667
683
  GLIB_AVAILABLE_IN_ALL
@@ -344,23 +344,25 @@ GQuark g_variant_parse_error_quark (void);
344
344
  * G_VARIANT_BUILDER_INIT:
345
345
  * @variant_type: a const GVariantType*
346
346
  *
347
- * A stack-allocated #GVariantBuilder must be initialized if it is
348
- * used together with g_auto() to avoid warnings or crashes if
349
- * function returns before g_variant_builder_init() is called on the
350
- * builder.
347
+ * A stack-allocated [struct@GLib.VariantBuilder] must be initialized
348
+ * if it is used together with
349
+ * [`g_auto()`](auto-cleanup.html#variable-declaration). This macro can
350
+ * be used as initializer when declaring the builder, but it cannot be
351
+ * assigned to a variable.
351
352
  *
352
- * This macro can be used as initializer instead of an
353
- * explicit zeroing a variable when declaring it and a following
354
- * g_variant_builder_init(), but it cannot be assigned to a variable.
353
+ * The effects of initializing the builder with
354
+ * `G_VARIANT_BUILDER_INIT` is the same as initializing it with
355
+ * [func@GLib.VARIANT_BUILDER_INIT_UNSET], followed by a call to
356
+ * [method@GLib.VariantBuilder.init].
355
357
  *
356
- * The passed @variant_type should be a static GVariantType to avoid
357
- * lifetime issues, as copying the @variant_type does not happen in
358
- * the G_VARIANT_BUILDER_INIT() call, but rather in functions that
359
- * make sure that #GVariantBuilder is valid.
358
+ * The passed @variant_type should be a static [type@GLib.VariantType]
359
+ * to avoid lifetime issues, as copying the @variant_type does not
360
+ * happen in the `G_VARIANT_BUILDER_INIT` call, but rather in functions
361
+ * that make sure that [struct@GLib.VariantBuilder] is valid.
360
362
  *
361
- * |[<!-- language="C" -->
363
+ * ```c
362
364
  * g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_BYTESTRING);
363
- * ]|
365
+ * ```
364
366
  *
365
367
  * Since: 2.50
366
368
  */
@@ -373,6 +375,38 @@ GQuark g_variant_parse_error_quark (void);
373
375
  } \
374
376
  }
375
377
 
378
+ /**
379
+ * G_VARIANT_BUILDER_INIT_UNSET:
380
+ *
381
+ * A stack-allocated [struct@GLib.VariantBuilder] must be initialized
382
+ * if it is used together with
383
+ * [`g_auto()`](auto-cleanup.html#variable-declaration). This macro can
384
+ * be used as initializer when declaring the builder, but it cannot be
385
+ * assigned to a variable.
386
+ *
387
+ * The builder can be initialized to a specific [type@GLib.VariantType]
388
+ * later with [method@GLib.VariantBuilder.init].
389
+ *
390
+ * Use [func@GLib.VARIANT_BUILDER_INIT] to directly initialize the
391
+ * builder with a specific [type@GLib.VariantType].
392
+ *
393
+ * ```c
394
+ * g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT_UNSET ();
395
+ *
396
+ * if (condition)
397
+ * return NULL;
398
+ *
399
+ * g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{su}"));
400
+ * return g_variant_ref_sink (g_variant_builder_end (&builder));
401
+ * ```
402
+ *
403
+ * Since: 2.84
404
+ */
405
+ #define G_VARIANT_BUILDER_INIT_UNSET() \
406
+ { \
407
+ 0, \
408
+ } GLIB_AVAILABLE_MACRO_IN_2_84
409
+
376
410
  GLIB_AVAILABLE_IN_ALL
377
411
  GVariantBuilder * g_variant_builder_new (const GVariantType *type);
378
412
  GLIB_AVAILABLE_IN_ALL
@@ -382,6 +416,9 @@ GVariantBuilder * g_variant_builder_ref (GVarian
382
416
  GLIB_AVAILABLE_IN_ALL
383
417
  void g_variant_builder_init (GVariantBuilder *builder,
384
418
  const GVariantType *type);
419
+ GLIB_AVAILABLE_IN_2_84
420
+ void g_variant_builder_init_static (GVariantBuilder *builder,
421
+ const GVariantType *type);
385
422
  GLIB_AVAILABLE_IN_ALL
386
423
  GVariant * g_variant_builder_end (GVariantBuilder *builder);
387
424
  GLIB_AVAILABLE_IN_ALL