@img/sharp-libvips-dev-wasm32 1.3.0-rc.1 → 1.3.0-rc.10

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 (191) hide show
  1. package/README.md +23 -23
  2. package/include/aom/aom_codec.h +1 -1
  3. package/include/aom/aom_decoder.h +4 -0
  4. package/include/aom/aom_encoder.h +19 -8
  5. package/include/aom/aom_ext_ratectrl.h +664 -0
  6. package/include/aom/aom_image.h +93 -30
  7. package/include/aom/aom_tpl.h +99 -0
  8. package/include/aom/aomcx.h +89 -16
  9. package/include/aom/aomdx.h +12 -0
  10. package/include/expat.h +15 -3
  11. package/include/expat_config.h +6 -6
  12. package/include/expat_external.h +4 -4
  13. package/include/glib-2.0/gio/gdbusconnection.h +2 -8
  14. package/include/glib-2.0/gio/gfileattribute.h +1 -1
  15. package/include/glib-2.0/gio/gfileinfo.h +5 -0
  16. package/include/glib-2.0/gio/gicon.h +1 -1
  17. package/include/glib-2.0/gio/gio-autocleanups.h +0 -1
  18. package/include/glib-2.0/gio/gio-visibility.h +34 -0
  19. package/include/glib-2.0/gio/gio.h +2 -0
  20. package/include/glib-2.0/gio/gioenums.h +66 -44
  21. package/include/glib-2.0/gio/gioenumtypes.h +2 -0
  22. package/include/glib-2.0/gio/giptosmessage.h +46 -0
  23. package/include/glib-2.0/gio/gipv6tclassmessage.h +46 -0
  24. package/include/glib-2.0/gio/gresolver.h +1 -1
  25. package/include/glib-2.0/gio/gsettings.h +1 -1
  26. package/include/glib-2.0/gio/gsocketcontrolmessage.h +2 -0
  27. package/include/glib-2.0/glib/gatomic.h +26 -2
  28. package/include/glib-2.0/glib/gfileutils.h +2 -2
  29. package/include/glib-2.0/glib/ghook.h +3 -1
  30. package/include/glib-2.0/glib/giochannel.h +1 -1
  31. package/include/glib-2.0/glib/gkeyfile.h +1 -1
  32. package/include/glib-2.0/glib/glib-visibility.h +34 -0
  33. package/include/glib-2.0/glib/gmacros.h +32 -0
  34. package/include/glib-2.0/glib/gmain.h +4 -0
  35. package/include/glib-2.0/glib/gmarkup.h +18 -1
  36. package/include/glib-2.0/glib/gmem.h +4 -4
  37. package/include/glib-2.0/glib/gmessages.h +7 -9
  38. package/include/glib-2.0/glib/gnode.h +1 -1
  39. package/include/glib-2.0/glib/goption.h +1 -1
  40. package/include/glib-2.0/glib/gsequence.h +2 -2
  41. package/include/glib-2.0/glib/gslice.h +12 -4
  42. package/include/glib-2.0/glib/gspawn.h +1 -1
  43. package/include/glib-2.0/glib/gstrfuncs.h +191 -1
  44. package/include/glib-2.0/glib/gtestutils.h +6 -3
  45. package/include/glib-2.0/glib/gtimer.h +1 -0
  46. package/include/glib-2.0/glib/guri.h +3 -3
  47. package/include/glib-2.0/glib/gutils.h +10 -1
  48. package/include/glib-2.0/glib/gvarianttype.h +16 -16
  49. package/include/glib-2.0/glib/gversionmacros.h +22 -0
  50. package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
  51. package/include/glib-2.0/gmodule.h +1 -1
  52. package/include/glib-2.0/gobject/gbinding.h +1 -1
  53. package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
  54. package/include/glib-2.0/gobject/gobject.h +1 -1
  55. package/include/glib-2.0/gobject/gparam.h +1 -1
  56. package/include/glib-2.0/gobject/gsignal.h +8 -8
  57. package/include/glib-2.0/gobject/gtype.h +17 -17
  58. package/include/hwy/aligned_allocator.h +44 -2
  59. package/include/hwy/auto_tune.h +22 -6
  60. package/include/hwy/base.h +60 -90
  61. package/include/hwy/bit_set.h +410 -0
  62. package/include/hwy/cache_control.h +3 -2
  63. package/include/hwy/detect_compiler_arch.h +134 -14
  64. package/include/hwy/detect_targets.h +82 -36
  65. package/include/hwy/highway.h +15 -0
  66. package/include/hwy/nanobenchmark.h +12 -3
  67. package/include/hwy/ops/arm_neon-inl.h +96 -25
  68. package/include/hwy/ops/arm_sve-inl.h +250 -95
  69. package/include/hwy/ops/emu128-inl.h +12 -7
  70. package/include/hwy/ops/generic_ops-inl.h +271 -131
  71. package/include/hwy/ops/loongarch_lasx-inl.h +31 -9
  72. package/include/hwy/ops/loongarch_lsx-inl.h +33 -12
  73. package/include/hwy/ops/ppc_vsx-inl.h +99 -19
  74. package/include/hwy/ops/rvv-inl.h +239 -130
  75. package/include/hwy/ops/scalar-inl.h +22 -7
  76. package/include/hwy/ops/set_macros-inl.h +163 -107
  77. package/include/hwy/ops/wasm_128-inl.h +13 -22
  78. package/include/hwy/ops/x86_128-inl.h +223 -120
  79. package/include/hwy/ops/x86_256-inl.h +70 -134
  80. package/include/hwy/ops/x86_512-inl.h +130 -134
  81. package/include/hwy/print-inl.h +2 -0
  82. package/include/hwy/profiler.h +355 -264
  83. package/include/hwy/robust_statistics.h +3 -1
  84. package/include/hwy/timer.h +44 -0
  85. package/include/lcms2.h +35 -5
  86. package/include/lcms2_plugin.h +1 -1
  87. package/include/libexif/exif-utils.h +1 -1
  88. package/include/libheif/heif.h +2 -0
  89. package/include/libheif/heif_aux_images.h +2 -2
  90. package/include/libheif/heif_brands.h +16 -4
  91. package/include/libheif/heif_color.h +147 -25
  92. package/include/libheif/heif_components.h +264 -0
  93. package/include/libheif/heif_context.h +18 -4
  94. package/include/libheif/heif_cxx.h +20 -18
  95. package/include/libheif/heif_decoding.h +63 -9
  96. package/include/libheif/heif_encoding.h +46 -12
  97. package/include/libheif/heif_error.h +15 -6
  98. package/include/libheif/heif_export.h +48 -0
  99. package/include/libheif/heif_image.h +94 -32
  100. package/include/libheif/heif_image_handle.h +54 -3
  101. package/include/libheif/heif_items.h +25 -2
  102. package/include/libheif/heif_library.h +13 -18
  103. package/include/libheif/heif_metadata.h +5 -2
  104. package/include/libheif/heif_omaf.h +104 -0
  105. package/include/libheif/heif_plugin.h +80 -13
  106. package/include/libheif/heif_properties.h +259 -5
  107. package/include/libheif/heif_regions.h +5 -3
  108. package/include/libheif/heif_security.h +24 -2
  109. package/include/libheif/heif_sequences.h +163 -14
  110. package/include/libheif/heif_text.h +161 -0
  111. package/include/libheif/heif_tiling.h +2 -2
  112. package/include/libheif/heif_uncompressed.h +29 -5
  113. package/include/libheif/heif_version.h +2 -2
  114. package/include/libpng16/png.h +637 -488
  115. package/include/libpng16/pngconf.h +2 -2
  116. package/include/libpng16/pnglibconf.h +2 -2
  117. package/include/png.h +637 -488
  118. package/include/pngconf.h +2 -2
  119. package/include/pnglibconf.h +2 -2
  120. package/include/resvg.h +3 -3
  121. package/include/tiffconf.h +9 -10
  122. package/include/tiffio.h +10 -9
  123. package/include/tiffvers.h +1 -1
  124. package/include/ultrahdr_api.h +5 -11
  125. package/include/vips/colour.h +2 -2
  126. package/include/vips/memory.h +1 -1
  127. package/include/vips/version.h +4 -4
  128. package/include/zlib.h +3 -3
  129. package/lib/glib-2.0/include/glibconfig.h +1 -3
  130. package/lib/libaom.a +0 -0
  131. package/lib/libcgif.a +0 -0
  132. package/lib/libexif.a +0 -0
  133. package/lib/libexif.la +1 -1
  134. package/lib/libexpat.a +0 -0
  135. package/lib/libexpat.la +2 -2
  136. package/lib/libffi.a +0 -0
  137. package/lib/libgio-2.0.a +0 -0
  138. package/lib/libglib-2.0.a +0 -0
  139. package/lib/libgmodule-2.0.a +0 -0
  140. package/lib/libgobject-2.0.a +0 -0
  141. package/lib/libgthread-2.0.a +0 -0
  142. package/lib/libheif.a +0 -0
  143. package/lib/libhwy.a +0 -0
  144. package/lib/libimagequant.a +0 -0
  145. package/lib/libjpeg.a +0 -0
  146. package/lib/liblcms2.a +0 -0
  147. package/lib/libpng.a +0 -0
  148. package/lib/libpng.la +2 -2
  149. package/lib/libpng16.a +0 -0
  150. package/lib/libpng16.la +2 -2
  151. package/lib/libresvg.a +0 -0
  152. package/lib/libsharpyuv.a +0 -0
  153. package/lib/libtiff.a +0 -0
  154. package/lib/libuhdr.a +0 -0
  155. package/lib/libvips-cpp.a +0 -0
  156. package/lib/libvips.a +0 -0
  157. package/lib/libwebp.a +0 -0
  158. package/lib/libwebpdecoder.a +0 -0
  159. package/lib/libwebpdemux.a +0 -0
  160. package/lib/libwebpmux.a +0 -0
  161. package/lib/libz.a +0 -0
  162. package/lib/pkgconfig/aom.pc +2 -2
  163. package/lib/pkgconfig/cgif.pc +1 -1
  164. package/lib/pkgconfig/expat.pc +1 -1
  165. package/lib/pkgconfig/gio-2.0.pc +1 -1
  166. package/lib/pkgconfig/glib-2.0.pc +1 -1
  167. package/lib/pkgconfig/gmodule-2.0.pc +1 -1
  168. package/lib/pkgconfig/gmodule-export-2.0.pc +1 -1
  169. package/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
  170. package/lib/pkgconfig/gobject-2.0.pc +1 -1
  171. package/lib/pkgconfig/gthread-2.0.pc +1 -1
  172. package/lib/pkgconfig/lcms2.pc +1 -1
  173. package/lib/pkgconfig/libexif.pc +1 -1
  174. package/lib/pkgconfig/libheif.pc +1 -1
  175. package/lib/pkgconfig/libhwy.pc +3 -4
  176. package/lib/pkgconfig/libpng.pc +1 -1
  177. package/lib/pkgconfig/libpng16.pc +1 -1
  178. package/lib/pkgconfig/libsharpyuv.pc +1 -1
  179. package/lib/pkgconfig/libtiff-4.pc +2 -2
  180. package/lib/pkgconfig/libwebp.pc +1 -1
  181. package/lib/pkgconfig/libwebpdecoder.pc +11 -0
  182. package/lib/pkgconfig/libwebpmux.pc +1 -1
  183. package/lib/pkgconfig/vips-cpp.pc +1 -1
  184. package/lib/pkgconfig/vips.pc +1 -1
  185. package/package.json +1 -1
  186. package/versions.json +15 -15
  187. package/lib/libsharpyuv.la +0 -41
  188. package/lib/libtiff.la +0 -41
  189. package/lib/libwebp.la +0 -41
  190. package/lib/libwebpdemux.la +0 -41
  191. package/lib/libwebpmux.la +0 -41
@@ -302,7 +302,7 @@ typedef struct _GVariantType GVariantType;
302
302
 
303
303
  /* type string checking */
304
304
  GLIB_AVAILABLE_IN_ALL
305
- gboolean g_variant_type_string_is_valid (const gchar *type_string) G_GNUC_CONST;
305
+ gboolean g_variant_type_string_is_valid (const gchar *type_string) G_GNUC_PURE;
306
306
  GLIB_AVAILABLE_IN_ALL
307
307
  gboolean g_variant_type_string_scan (const gchar *string,
308
308
  const gchar *limit,
@@ -326,21 +326,21 @@ gchar * g_variant_type_dup_string (const G
326
326
 
327
327
  /* classification */
328
328
  GLIB_AVAILABLE_IN_ALL
329
- gboolean g_variant_type_is_definite (const GVariantType *type) G_GNUC_CONST;
329
+ gboolean g_variant_type_is_definite (const GVariantType *type) G_GNUC_PURE;
330
330
  GLIB_AVAILABLE_IN_ALL
331
- gboolean g_variant_type_is_container (const GVariantType *type) G_GNUC_CONST;
331
+ gboolean g_variant_type_is_container (const GVariantType *type) G_GNUC_PURE;
332
332
  GLIB_AVAILABLE_IN_ALL
333
- gboolean g_variant_type_is_basic (const GVariantType *type) G_GNUC_CONST;
333
+ gboolean g_variant_type_is_basic (const GVariantType *type) G_GNUC_PURE;
334
334
  GLIB_AVAILABLE_IN_ALL
335
- gboolean g_variant_type_is_maybe (const GVariantType *type) G_GNUC_CONST;
335
+ gboolean g_variant_type_is_maybe (const GVariantType *type) G_GNUC_PURE;
336
336
  GLIB_AVAILABLE_IN_ALL
337
- gboolean g_variant_type_is_array (const GVariantType *type) G_GNUC_CONST;
337
+ gboolean g_variant_type_is_array (const GVariantType *type) G_GNUC_PURE;
338
338
  GLIB_AVAILABLE_IN_ALL
339
- gboolean g_variant_type_is_tuple (const GVariantType *type) G_GNUC_CONST;
339
+ gboolean g_variant_type_is_tuple (const GVariantType *type) G_GNUC_PURE;
340
340
  GLIB_AVAILABLE_IN_ALL
341
- gboolean g_variant_type_is_dict_entry (const GVariantType *type) G_GNUC_CONST;
341
+ gboolean g_variant_type_is_dict_entry (const GVariantType *type) G_GNUC_PURE;
342
342
  GLIB_AVAILABLE_IN_ALL
343
- gboolean g_variant_type_is_variant (const GVariantType *type) G_GNUC_CONST;
343
+ gboolean g_variant_type_is_variant (const GVariantType *type) G_GNUC_PURE;
344
344
 
345
345
  /* for hash tables */
346
346
  GLIB_AVAILABLE_IN_ALL
@@ -352,21 +352,21 @@ gboolean g_variant_type_equal (gconstp
352
352
  /* subtypes */
353
353
  GLIB_AVAILABLE_IN_ALL
354
354
  gboolean g_variant_type_is_subtype_of (const GVariantType *type,
355
- const GVariantType *supertype) G_GNUC_CONST;
355
+ const GVariantType *supertype) G_GNUC_PURE;
356
356
 
357
357
  /* type iterator interface */
358
358
  GLIB_AVAILABLE_IN_ALL
359
- const GVariantType * g_variant_type_element (const GVariantType *type) G_GNUC_CONST;
359
+ const GVariantType * g_variant_type_element (const GVariantType *type) G_GNUC_PURE;
360
360
  GLIB_AVAILABLE_IN_ALL
361
- const GVariantType * g_variant_type_first (const GVariantType *type) G_GNUC_CONST;
361
+ const GVariantType * g_variant_type_first (const GVariantType *type) G_GNUC_PURE;
362
362
  GLIB_AVAILABLE_IN_ALL
363
- const GVariantType * g_variant_type_next (const GVariantType *type) G_GNUC_CONST;
363
+ const GVariantType * g_variant_type_next (const GVariantType *type) G_GNUC_PURE;
364
364
  GLIB_AVAILABLE_IN_ALL
365
- gsize g_variant_type_n_items (const GVariantType *type) G_GNUC_CONST;
365
+ gsize g_variant_type_n_items (const GVariantType *type) G_GNUC_PURE;
366
366
  GLIB_AVAILABLE_IN_ALL
367
- const GVariantType * g_variant_type_key (const GVariantType *type) G_GNUC_CONST;
367
+ const GVariantType * g_variant_type_key (const GVariantType *type) G_GNUC_PURE;
368
368
  GLIB_AVAILABLE_IN_ALL
369
- const GVariantType * g_variant_type_value (const GVariantType *type) G_GNUC_CONST;
369
+ const GVariantType * g_variant_type_value (const GVariantType *type) G_GNUC_PURE;
370
370
 
371
371
  /* constructors */
372
372
  GLIB_AVAILABLE_IN_ALL
@@ -33,6 +33,19 @@
33
33
 
34
34
  /* Version boundaries checks */
35
35
 
36
+ /**
37
+ * G_ENCODE_VERSION:
38
+ * @major: major version number
39
+ * @minor: minor version number
40
+ *
41
+ * Encode a major.minor version as a single integer.
42
+ *
43
+ * This is the encoding used by macros such as `GLIB_VERSION_2_84` and
44
+ * `GLIB_VERSION_CUR_STABLE`, and is intended to be used when (for example)
45
+ * setting the value of `GLIB_VERSION_MAX_ALLOWED`.
46
+ *
47
+ * Since: 2.32
48
+ */
36
49
  #define G_ENCODE_VERSION(major, minor) ((major) << 16 | (minor) << 8)
37
50
 
38
51
  /**
@@ -431,6 +444,15 @@
431
444
  * Since: 2.88
432
445
  */
433
446
  #define GLIB_VERSION_2_88 (G_ENCODE_VERSION (2, 88))
447
+ /**
448
+ * GLIB_VERSION_2_90:
449
+ *
450
+ * A macro that evaluates to the 2.90 version of GLib, in a format
451
+ * that can be used by the C pre-processor.
452
+ *
453
+ * Since: 2.90
454
+ */
455
+ #define GLIB_VERSION_2_90 (G_ENCODE_VERSION (2, 90))
434
456
 
435
457
  /**
436
458
  * GLIB_VERSION_CUR_STABLE:
@@ -1120,3 +1120,37 @@
1120
1120
  #define GMODULE_AVAILABLE_ENUMERATOR_IN_2_88
1121
1121
  #define GMODULE_AVAILABLE_TYPE_IN_2_88
1122
1122
  #endif
1123
+
1124
+ #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_90
1125
+ #define GMODULE_DEPRECATED_IN_2_90 GMODULE_DEPRECATED
1126
+ #define GMODULE_DEPRECATED_IN_2_90_FOR(f) GMODULE_DEPRECATED_FOR (f)
1127
+ #define GMODULE_DEPRECATED_MACRO_IN_2_90 GLIB_DEPRECATED_MACRO
1128
+ #define GMODULE_DEPRECATED_MACRO_IN_2_90_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
1129
+ #define GMODULE_DEPRECATED_ENUMERATOR_IN_2_90 GLIB_DEPRECATED_ENUMERATOR
1130
+ #define GMODULE_DEPRECATED_ENUMERATOR_IN_2_90_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f)
1131
+ #define GMODULE_DEPRECATED_TYPE_IN_2_90 GLIB_DEPRECATED_TYPE
1132
+ #define GMODULE_DEPRECATED_TYPE_IN_2_90_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f)
1133
+ #else
1134
+ #define GMODULE_DEPRECATED_IN_2_90 _GMODULE_EXTERN
1135
+ #define GMODULE_DEPRECATED_IN_2_90_FOR(f) _GMODULE_EXTERN
1136
+ #define GMODULE_DEPRECATED_MACRO_IN_2_90
1137
+ #define GMODULE_DEPRECATED_MACRO_IN_2_90_FOR(f)
1138
+ #define GMODULE_DEPRECATED_ENUMERATOR_IN_2_90
1139
+ #define GMODULE_DEPRECATED_ENUMERATOR_IN_2_90_FOR(f)
1140
+ #define GMODULE_DEPRECATED_TYPE_IN_2_90
1141
+ #define GMODULE_DEPRECATED_TYPE_IN_2_90_FOR(f)
1142
+ #endif
1143
+
1144
+ #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_90
1145
+ #define GMODULE_AVAILABLE_IN_2_90 GMODULE_UNAVAILABLE (2, 90)
1146
+ #define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_90 GLIB_UNAVAILABLE_STATIC_INLINE (2, 90)
1147
+ #define GMODULE_AVAILABLE_MACRO_IN_2_90 GLIB_UNAVAILABLE_MACRO (2, 90)
1148
+ #define GMODULE_AVAILABLE_ENUMERATOR_IN_2_90 GLIB_UNAVAILABLE_ENUMERATOR (2, 90)
1149
+ #define GMODULE_AVAILABLE_TYPE_IN_2_90 GLIB_UNAVAILABLE_TYPE (2, 90)
1150
+ #else
1151
+ #define GMODULE_AVAILABLE_IN_2_90 _GMODULE_EXTERN
1152
+ #define GMODULE_AVAILABLE_STATIC_INLINE_IN_2_90
1153
+ #define GMODULE_AVAILABLE_MACRO_IN_2_90
1154
+ #define GMODULE_AVAILABLE_ENUMERATOR_IN_2_90
1155
+ #define GMODULE_AVAILABLE_TYPE_IN_2_90
1156
+ #endif
@@ -65,7 +65,7 @@ typedef enum
65
65
  G_MODULE_BIND_LAZY = 1 << 0,
66
66
  G_MODULE_BIND_LOCAL = 1 << 1,
67
67
  G_MODULE_BIND_MASK = 0x03
68
- } GModuleFlags;
68
+ } G_GNUC_FLAG_ENUM GModuleFlags;
69
69
 
70
70
  typedef struct _GModule GModule;
71
71
  typedef const gchar* (*GModuleCheckInit) (GModule *module);
@@ -94,7 +94,7 @@ typedef enum { /*< prefix=G_BINDING >*/
94
94
  G_BINDING_BIDIRECTIONAL = 1 << 0,
95
95
  G_BINDING_SYNC_CREATE = 1 << 1,
96
96
  G_BINDING_INVERT_BOOLEAN = 1 << 2
97
- } GBindingFlags;
97
+ } G_GNUC_FLAG_ENUM GBindingFlags;
98
98
 
99
99
  GOBJECT_AVAILABLE_IN_ALL
100
100
  GType g_binding_flags_get_type (void) G_GNUC_CONST;
@@ -1120,3 +1120,37 @@
1120
1120
  #define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_88
1121
1121
  #define GOBJECT_AVAILABLE_TYPE_IN_2_88
1122
1122
  #endif
1123
+
1124
+ #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_90
1125
+ #define GOBJECT_DEPRECATED_IN_2_90 GOBJECT_DEPRECATED
1126
+ #define GOBJECT_DEPRECATED_IN_2_90_FOR(f) GOBJECT_DEPRECATED_FOR (f)
1127
+ #define GOBJECT_DEPRECATED_MACRO_IN_2_90 GLIB_DEPRECATED_MACRO
1128
+ #define GOBJECT_DEPRECATED_MACRO_IN_2_90_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
1129
+ #define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_90 GLIB_DEPRECATED_ENUMERATOR
1130
+ #define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_90_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f)
1131
+ #define GOBJECT_DEPRECATED_TYPE_IN_2_90 GLIB_DEPRECATED_TYPE
1132
+ #define GOBJECT_DEPRECATED_TYPE_IN_2_90_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f)
1133
+ #else
1134
+ #define GOBJECT_DEPRECATED_IN_2_90 _GOBJECT_EXTERN
1135
+ #define GOBJECT_DEPRECATED_IN_2_90_FOR(f) _GOBJECT_EXTERN
1136
+ #define GOBJECT_DEPRECATED_MACRO_IN_2_90
1137
+ #define GOBJECT_DEPRECATED_MACRO_IN_2_90_FOR(f)
1138
+ #define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_90
1139
+ #define GOBJECT_DEPRECATED_ENUMERATOR_IN_2_90_FOR(f)
1140
+ #define GOBJECT_DEPRECATED_TYPE_IN_2_90
1141
+ #define GOBJECT_DEPRECATED_TYPE_IN_2_90_FOR(f)
1142
+ #endif
1143
+
1144
+ #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_90
1145
+ #define GOBJECT_AVAILABLE_IN_2_90 GOBJECT_UNAVAILABLE (2, 90)
1146
+ #define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_90 GLIB_UNAVAILABLE_STATIC_INLINE (2, 90)
1147
+ #define GOBJECT_AVAILABLE_MACRO_IN_2_90 GLIB_UNAVAILABLE_MACRO (2, 90)
1148
+ #define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_90 GLIB_UNAVAILABLE_ENUMERATOR (2, 90)
1149
+ #define GOBJECT_AVAILABLE_TYPE_IN_2_90 GLIB_UNAVAILABLE_TYPE (2, 90)
1150
+ #else
1151
+ #define GOBJECT_AVAILABLE_IN_2_90 _GOBJECT_EXTERN
1152
+ #define GOBJECT_AVAILABLE_STATIC_INLINE_IN_2_90
1153
+ #define GOBJECT_AVAILABLE_MACRO_IN_2_90
1154
+ #define GOBJECT_AVAILABLE_ENUMERATOR_IN_2_90
1155
+ #define GOBJECT_AVAILABLE_TYPE_IN_2_90
1156
+ #endif
@@ -356,7 +356,7 @@ struct _GObjectClass
356
356
  /*< private >*/
357
357
  gsize flags;
358
358
 
359
- gsize n_construct_properties;
359
+ gsize n_construct_properties; /* functionally this is limited to UINT_MAX */
360
360
 
361
361
  gpointer pspecs;
362
362
  gsize n_pspecs;
@@ -169,7 +169,7 @@ typedef enum
169
169
  G_PARAM_EXPLICIT_NOTIFY = 1 << 30,
170
170
  /* Avoid warning with -Wpedantic for gcc6 */
171
171
  G_PARAM_DEPRECATED = (gint)(1u << 31)
172
- } GParamFlags;
172
+ } G_GNUC_FLAG_ENUM GParamFlags;
173
173
 
174
174
  /**
175
175
  * G_PARAM_STATIC_STRINGS:
@@ -109,16 +109,16 @@ typedef gboolean (*GSignalAccumulator) (GSignalInvocationHint *ihint,
109
109
  /* --- run, match and connect types --- */
110
110
  /**
111
111
  * GSignalFlags:
112
- * @G_SIGNAL_RUN_FIRST: Invoke the object method handler in the first emission stage.
113
- * @G_SIGNAL_RUN_LAST: Invoke the object method handler in the third emission stage.
114
- * @G_SIGNAL_RUN_CLEANUP: Invoke the object method handler in the last emission stage.
112
+ * @G_SIGNAL_RUN_FIRST: Invoke the default signal handler in the first emission stage
113
+ * @G_SIGNAL_RUN_LAST: Invoke the default signal handler in the third emission stage
114
+ * @G_SIGNAL_RUN_CLEANUP: Invoke the default signal handler in the last emission stage
115
115
  * @G_SIGNAL_NO_RECURSE: Signals being emitted for an object while currently being in
116
116
  * emission for this very object will not be emitted recursively,
117
117
  * but instead cause the first emission to be restarted.
118
- * @G_SIGNAL_DETAILED: This signal supports "::detail" appendices to the signal name
118
+ * @G_SIGNAL_DETAILED: This signal supports `::detail` appendices to the signal name
119
119
  * upon handler connections and emissions.
120
120
  * @G_SIGNAL_ACTION: Action signals are signals that may freely be emitted on alive
121
- * objects from user code via g_signal_emit() and friends, without
121
+ * objects from user code via [func@GObject.signal_emit] and friends, without
122
122
  * the need of being embedded into extra code that performs pre or
123
123
  * post emission adjustments on the object. They can also be thought
124
124
  * of as object methods which can be called generically by
@@ -140,7 +140,7 @@ typedef enum
140
140
  G_SIGNAL_DEPRECATED = 1 << 8,
141
141
  /* normal signal flags until 1 << 16 */
142
142
  G_SIGNAL_ACCUMULATOR_FIRST_RUN = 1 << 17,
143
- } GSignalFlags;
143
+ } G_GNUC_FLAG_ENUM GSignalFlags;
144
144
 
145
145
  /**
146
146
  * G_SIGNAL_MUST_COLLECT:
@@ -197,7 +197,7 @@ typedef enum
197
197
  G_CONNECT_DEFAULT GOBJECT_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
198
198
  G_CONNECT_AFTER = 1 << 0,
199
199
  G_CONNECT_SWAPPED = 1 << 1
200
- } GConnectFlags;
200
+ } G_GNUC_FLAG_ENUM GConnectFlags;
201
201
  /**
202
202
  * GSignalMatchType:
203
203
  * @G_SIGNAL_MATCH_ID: The signal id must be equal.
@@ -219,7 +219,7 @@ typedef enum
219
219
  G_SIGNAL_MATCH_FUNC = 1 << 3,
220
220
  G_SIGNAL_MATCH_DATA = 1 << 4,
221
221
  G_SIGNAL_MATCH_UNBLOCKED = 1 << 5
222
- } GSignalMatchType;
222
+ } G_GNUC_FLAG_ENUM GSignalMatchType;
223
223
  /**
224
224
  * G_SIGNAL_MATCH_MASK:
225
225
  *
@@ -728,7 +728,7 @@ typedef enum /*< skip >*/
728
728
  G_TYPE_DEBUG_SIGNALS = 1 << 1,
729
729
  G_TYPE_DEBUG_INSTANCE_COUNT = 1 << 2,
730
730
  G_TYPE_DEBUG_MASK = 0x07
731
- } GTypeDebugFlags GOBJECT_DEPRECATED_TYPE_IN_2_36;
731
+ } G_GNUC_FLAG_ENUM GTypeDebugFlags GOBJECT_DEPRECATED_TYPE_IN_2_36;
732
732
 
733
733
 
734
734
  /* --- prototypes --- */
@@ -1067,7 +1067,7 @@ typedef enum /*< skip >*/
1067
1067
  G_TYPE_FLAG_INSTANTIATABLE = (1 << 1),
1068
1068
  G_TYPE_FLAG_DERIVABLE = (1 << 2),
1069
1069
  G_TYPE_FLAG_DEEP_DERIVABLE = (1 << 3)
1070
- } GTypeFundamentalFlags;
1070
+ } G_GNUC_FLAG_ENUM GTypeFundamentalFlags;
1071
1071
  /**
1072
1072
  * GTypeFlags:
1073
1073
  * @G_TYPE_FLAG_NONE: No special flags. Since: 2.74
@@ -1091,7 +1091,7 @@ typedef enum /*< skip >*/
1091
1091
  G_TYPE_FLAG_VALUE_ABSTRACT = (1 << 5),
1092
1092
  G_TYPE_FLAG_FINAL GOBJECT_AVAILABLE_ENUMERATOR_IN_2_70 = (1 << 6),
1093
1093
  G_TYPE_FLAG_DEPRECATED GOBJECT_AVAILABLE_ENUMERATOR_IN_2_76 = (1 << 7)
1094
- } GTypeFlags;
1094
+ } G_GNUC_FLAG_ENUM GTypeFlags;
1095
1095
  /**
1096
1096
  * GTypeInfo:
1097
1097
  * @class_size: Size of the class structure (required for interface, classed and instantiatable types)
@@ -1574,7 +1574,7 @@ guint g_type_get_type_registration_serial (void);
1574
1574
  * - the usual `my_app_window_get_type()` function is declared with a return type of #GType
1575
1575
  *
1576
1576
  * - the `MyAppWindow` type is defined as a `typedef` of `struct _MyAppWindow`. The struct itself is not
1577
- * defined and should be defined from the .c file before G_DEFINE_TYPE() is used.
1577
+ * defined and should be defined from the `.c` file before `G_DEFINE_TYPE()` is used.
1578
1578
  *
1579
1579
  * - the `MY_APP_WINDOW()` cast is emitted as `static inline` function along with the `MY_APP_IS_WINDOW()` type
1580
1580
  * checking function
@@ -1585,9 +1585,9 @@ guint g_type_get_type_registration_serial (void);
1585
1585
  * and therefore the fact that the size of the class structure is exposed is not a concern and it can be
1586
1586
  * freely changed at any point in the future.
1587
1587
  *
1588
- * - g_autoptr() support being added for your type, based on the type of your parent class
1588
+ * - `g_autoptr()` support being added for your type, based on the type of your parent class
1589
1589
  *
1590
- * You can only use this function if your parent type also supports g_autoptr().
1590
+ * You can only use this function if your parent type also supports `g_autoptr()`.
1591
1591
  *
1592
1592
  * Because the type macro (`MY_APP_TYPE_WINDOW` in the above example) is not a callable, you must continue to
1593
1593
  * manually define this as a macro for yourself.
@@ -1595,11 +1595,11 @@ guint g_type_get_type_registration_serial (void);
1595
1595
  * The declaration of the `_get_type()` function is the first thing emitted by the macro. This allows this macro
1596
1596
  * to be used in the usual way with export control and API versioning macros.
1597
1597
  *
1598
- * If you want to declare your own class structure, use G_DECLARE_DERIVABLE_TYPE().
1598
+ * If you want to declare your own class structure, use [func@GObject.DECLARE_DERIVABLE_TYPE].
1599
1599
  *
1600
1600
  * If you are writing a library, it is important to note that it is possible to convert a type from using
1601
- * G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you
1602
- * should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be
1601
+ * `G_DECLARE_FINAL_TYPE()` to `G_DECLARE_DERIVABLE_TYPE()` without breaking API or ABI. As a precaution, you
1602
+ * should therefore use `G_DECLARE_FINAL_TYPE()` until you are sure that it makes sense for your class to be
1603
1603
  * subclassed. Once a class structure has been exposed it is not possible to change its size or remove or
1604
1604
  * reorder items without breaking the API and/or ABI.
1605
1605
  *
@@ -1687,7 +1687,7 @@ guint g_type_get_type_registration_serial (void);
1687
1687
  *
1688
1688
  * - g_autoptr() support being added for your type, based on the type of your parent class
1689
1689
  *
1690
- * You can only use this function if your parent type also supports g_autoptr().
1690
+ * You can only use this function if your parent type also supports `g_autoptr()`.
1691
1691
  *
1692
1692
  * Because the type macro (`GTK_TYPE_FROBBER` in the above example) is not a callable, you must continue to
1693
1693
  * manually define this as a macro for yourself.
@@ -1696,14 +1696,14 @@ guint g_type_get_type_registration_serial (void);
1696
1696
  * to be used in the usual way with export control and API versioning macros.
1697
1697
  *
1698
1698
  * If you are writing a library, it is important to note that it is possible to convert a type from using
1699
- * G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you
1700
- * should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be
1699
+ * [func@GObject.DECLARE_FINAL_TYPE] to `G_DECLARE_DERIVABLE_TYPE()` without breaking API or ABI. As a precaution, you
1700
+ * should therefore use `G_DECLARE_FINAL_TYPE()` until you are sure that it makes sense for your class to be
1701
1701
  * subclassed. Once a class structure has been exposed it is not possible to change its size or remove or
1702
1702
  * reorder items without breaking the API and/or ABI. If you want to declare your own class structure, use
1703
- * G_DECLARE_DERIVABLE_TYPE(). If you want to declare a class without exposing the class or instance
1704
- * structures, use G_DECLARE_FINAL_TYPE().
1703
+ * `G_DECLARE_DERIVABLE_TYPE()`. If you want to declare a class without exposing the class or instance
1704
+ * structures, use `G_DECLARE_FINAL_TYPE()`.
1705
1705
  *
1706
- * If you must use G_DECLARE_DERIVABLE_TYPE() you should be sure to include some padding at the bottom of your
1706
+ * If you must use `G_DECLARE_DERIVABLE_TYPE()` you should be sure to include some padding at the bottom of your
1707
1707
  * class structure to leave space for the addition of future virtual functions.
1708
1708
  *
1709
1709
  * Since: 2.44
@@ -1931,9 +1931,9 @@ guint g_type_get_type_registration_serial (void);
1931
1931
  *
1932
1932
  * A convenience macro for type implementations.
1933
1933
  *
1934
- * Similar to G_DEFINE_TYPE(), but defines a final type.
1934
+ * Similar to [func@GObject.DEFINE_TYPE], but defines a final type.
1935
1935
  *
1936
- * See G_DEFINE_TYPE_EXTENDED() for an example.
1936
+ * See [func@GObject.DEFINE_TYPE_EXTENDED] for an example.
1937
1937
  *
1938
1938
  * Since: 2.70
1939
1939
  */
@@ -119,8 +119,21 @@ template <typename T, typename... Args>
119
119
  AlignedUniquePtr<T> MakeUniqueAlignedWithAlloc(AllocPtr alloc, FreePtr free,
120
120
  void* opaque, Args&&... args) {
121
121
  T* ptr = static_cast<T*>(AllocateAlignedBytes(sizeof(T), alloc, opaque));
122
+ if (HWY_UNLIKELY(ptr == nullptr)) {
123
+ return AlignedUniquePtr<T>(nullptr, AlignedDeleter(free, opaque));
124
+ }
125
+ #ifdef HWY_EXCEPTIONS_ENABLED
126
+ try {
127
+ return AlignedUniquePtr<T>(new (ptr) T(std::forward<Args>(args)...),
128
+ AlignedDeleter(free, opaque));
129
+ } catch (...) {
130
+ FreeAlignedBytes(ptr, free, opaque);
131
+ throw;
132
+ }
133
+ #else
122
134
  return AlignedUniquePtr<T>(new (ptr) T(std::forward<Args>(args)...),
123
135
  AlignedDeleter(free, opaque));
136
+ #endif
124
137
  }
125
138
 
126
139
  // Similar to MakeUniqueAlignedWithAlloc but using the default alloc/free
@@ -128,8 +141,21 @@ AlignedUniquePtr<T> MakeUniqueAlignedWithAlloc(AllocPtr alloc, FreePtr free,
128
141
  template <typename T, typename... Args>
129
142
  AlignedUniquePtr<T> MakeUniqueAligned(Args&&... args) {
130
143
  T* ptr = static_cast<T*>(AllocateAlignedBytes(sizeof(T)));
144
+ if (HWY_UNLIKELY(ptr == nullptr)) {
145
+ return AlignedUniquePtr<T>(nullptr, AlignedDeleter());
146
+ }
147
+ #ifdef HWY_EXCEPTIONS_ENABLED
148
+ try {
149
+ return AlignedUniquePtr<T>(new (ptr) T(std::forward<Args>(args)...),
150
+ AlignedDeleter());
151
+ } catch (...) {
152
+ FreeAlignedBytes(ptr, nullptr, nullptr);
153
+ throw;
154
+ }
155
+ #else
131
156
  return AlignedUniquePtr<T>(new (ptr) T(std::forward<Args>(args)...),
132
157
  AlignedDeleter());
158
+ #endif
133
159
  }
134
160
 
135
161
  template <class T>
@@ -147,8 +173,13 @@ struct AlignedAllocator {
147
173
  "AlignedAllocator only supports integer types");
148
174
  static_assert(sizeof(V) <= sizeof(std::size_t),
149
175
  "V n must be smaller or equal size_t to avoid overflow");
176
+ const size_t count = static_cast<std::size_t>(n);
177
+ if (HWY_LIKELY(count != 0) && sizeof(value_type) > SIZE_MAX / count) {
178
+ HWY_ABORT("AlignedAllocator: allocation size overflow "
179
+ "(%zu * %zu exceeds size_t)", count, sizeof(value_type));
180
+ }
150
181
  return static_cast<value_type*>(
151
- AllocateAlignedBytes(static_cast<std::size_t>(n) * sizeof(value_type)));
182
+ AllocateAlignedBytes(count * sizeof(value_type)));
152
183
  }
153
184
 
154
185
  template <class V>
@@ -208,7 +239,7 @@ AlignedUniquePtr<T[]> MakeUniqueAlignedArrayWithAlloc(
208
239
  T* ptr = detail::AllocateAlignedItems<T>(items, alloc, opaque);
209
240
  if (ptr != nullptr) {
210
241
  for (size_t i = 0; i < items; i++) {
211
- new (ptr + i) T(std::forward<Args>(args)...);
242
+ new (ptr + i) T(args...);
212
243
  }
213
244
  }
214
245
  return AlignedUniquePtr<T[]>(ptr, AlignedDeleter(free, opaque));
@@ -399,6 +430,10 @@ class AlignedNDArray {
399
430
  size_t offset = 0;
400
431
  size_t shape_index = 0;
401
432
  for (const size_t axis_index : indices) {
433
+ if (HWY_UNLIKELY(axis_index >= shape_[shape_index])) {
434
+ HWY_ABORT("AlignedNDArray index %zu out of bounds (axis %zu, size %zu)",
435
+ axis_index, shape_index, shape_[shape_index]);
436
+ }
402
437
  offset += memory_sizes_[shape_index + 1] * axis_index;
403
438
  shape_index++;
404
439
  }
@@ -417,6 +452,13 @@ class AlignedNDArray {
417
452
  sizes[axis] = 1;
418
453
  while (axis > 0) {
419
454
  --axis;
455
+ // Check for integer overflow in dimension multiplication.
456
+ if (HWY_LIKELY(shape[axis] != 0) &&
457
+ sizes[axis + 1] > SIZE_MAX / shape[axis]) {
458
+ HWY_ABORT("AlignedNDArray: dimension overflow at axis %zu "
459
+ "(%zu * %zu exceeds size_t)",
460
+ axis, sizes[axis + 1], shape[axis]);
461
+ }
420
462
  sizes[axis] = sizes[axis + 1] * shape[axis];
421
463
  }
422
464
  return sizes;
@@ -25,7 +25,18 @@
25
25
 
26
26
  #include "hwy/aligned_allocator.h" // Span
27
27
  #include "hwy/base.h" // HWY_MIN
28
- #include "hwy/contrib/sort/vqsort.h"
28
+
29
+ // configuration to allow auto_tune to use std::sort instead of VQSort
30
+ // (also enabled in header only mode).
31
+ #if defined(HWY_HEADER_ONLY)
32
+ #define HWY_AUTOTUNE_STDSORT
33
+ #endif
34
+
35
+ #ifdef HWY_AUTOTUNE_STDSORT
36
+ #include <algorithm> // std::sort
37
+ #else
38
+ #include "hwy/contrib/sort/vqsort.h" // VQSort
39
+ #endif
29
40
 
30
41
  // Infrastructure for auto-tuning (choosing optimal parameters at runtime).
31
42
 
@@ -104,6 +115,10 @@ class CostDistribution {
104
115
  private:
105
116
  static double Median(double* to_sort, size_t n) {
106
117
  HWY_DASSERT(n >= 2);
118
+
119
+ #ifdef HWY_AUTOTUNE_STDSORT
120
+ std::sort(to_sort, to_sort + n);
121
+ #else
107
122
  // F64 is supported everywhere except Armv7.
108
123
  #if !HWY_ARCH_ARM_V7
109
124
  VQSort(to_sort, n, SortAscending());
@@ -112,6 +127,8 @@ class CostDistribution {
112
127
  // equivalent.
113
128
  VQSort(reinterpret_cast<uint64_t*>(to_sort), n, SortAscending());
114
129
  #endif
130
+ #endif
131
+
115
132
  if (n & 1) return to_sort[n / 2];
116
133
  // Even length: average of two middle elements.
117
134
  return (to_sort[n / 2] + to_sort[n / 2 - 1]) * 0.5;
@@ -405,10 +422,9 @@ class AutoTune {
405
422
  const Config* Best() const { return best_; }
406
423
 
407
424
  // If false, caller must call `SetCandidates` before `NextConfig`.
408
- bool HasCandidates() const {
409
- HWY_DASSERT(!Best());
410
- return !candidates_.empty();
411
- }
425
+ // NOTE: also called after Best() is non-null.
426
+ bool HasCandidates() const { return !candidates_.empty(); }
427
+
412
428
  // WARNING: invalidates `Best()`, do not call if that is non-null.
413
429
  void SetCandidates(std::vector<Config> candidates) {
414
430
  HWY_DASSERT(!Best() && !HasCandidates());
@@ -429,7 +445,7 @@ class AutoTune {
429
445
 
430
446
  // Returns the current `Config` to measure.
431
447
  const Config& NextConfig() const {
432
- HWY_DASSERT(!Best() && HasCandidates());
448
+ HWY_DASSERT(HasCandidates());
433
449
  return candidates_[config_idx_];
434
450
  }
435
451