@img/sharp-libvips-dev 1.0.1 → 1.0.2

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 (85) hide show
  1. package/include/expat.h +21 -10
  2. package/include/expat_config.h +11 -5
  3. package/include/ffi.h +12 -25
  4. package/include/freetype2/freetype/config/ftoption.h +1 -1
  5. package/include/gio-unix-2.0/gio/gfiledescriptorbased.h +3 -2
  6. package/include/glib-2.0/gio/gapplication.h +6 -0
  7. package/include/glib-2.0/gio/giotypes.h +0 -1
  8. package/include/glib-2.0/girepository/giarginfo.h +23 -6
  9. package/include/glib-2.0/girepository/gibaseinfo.h +44 -18
  10. package/include/glib-2.0/girepository/gicallableinfo.h +26 -16
  11. package/include/glib-2.0/girepository/gicallbackinfo.h +17 -2
  12. package/include/glib-2.0/girepository/giconstantinfo.h +19 -4
  13. package/include/glib-2.0/girepository/gienuminfo.h +20 -21
  14. package/include/glib-2.0/girepository/gifieldinfo.h +22 -7
  15. package/include/glib-2.0/girepository/giflagsinfo.h +60 -0
  16. package/include/glib-2.0/girepository/gifunctioninfo.h +22 -7
  17. package/include/glib-2.0/girepository/giinterfaceinfo.h +33 -18
  18. package/include/glib-2.0/girepository/giobjectinfo.h +41 -26
  19. package/include/glib-2.0/girepository/gipropertyinfo.h +18 -3
  20. package/include/glib-2.0/girepository/giregisteredtypeinfo.h +22 -11
  21. package/include/glib-2.0/girepository/girepository-autocleanups.h +56 -0
  22. package/include/glib-2.0/girepository/girepository.h +53 -62
  23. package/include/glib-2.0/girepository/girffi.h +8 -7
  24. package/include/glib-2.0/girepository/gisignalinfo.h +18 -3
  25. package/include/glib-2.0/girepository/gistructinfo.h +26 -11
  26. package/include/glib-2.0/girepository/gitypeinfo.h +29 -16
  27. package/include/glib-2.0/girepository/gitypelib.h +9 -13
  28. package/include/glib-2.0/girepository/gitypes.h +52 -104
  29. package/include/glib-2.0/girepository/giunioninfo.h +28 -12
  30. package/include/glib-2.0/girepository/giunresolvedinfo.h +17 -2
  31. package/include/glib-2.0/girepository/givalueinfo.h +65 -0
  32. package/include/glib-2.0/girepository/givfuncinfo.h +23 -8
  33. package/include/glib-2.0/glib/deprecated/gthread.h +9 -5
  34. package/include/glib-2.0/glib/gbitlock.h +31 -0
  35. package/include/glib-2.0/glib/gmessages.h +8 -0
  36. package/include/glib-2.0/glib/gslice.h +2 -0
  37. package/include/glib-2.0/glib/gstrfuncs.h +24 -18
  38. package/include/glib-2.0/glib/gthread.h +191 -3
  39. package/include/glib-2.0/glib-unix.h +7 -1
  40. package/include/glib-2.0/gobject/genums.h +6 -6
  41. package/include/glib-2.0/gobject/glib-types.h +11 -0
  42. package/include/glib-2.0/gobject/gsignal.h +16 -6
  43. package/include/hwy/aligned_allocator.h +171 -6
  44. package/include/hwy/base.h +1765 -543
  45. package/include/hwy/cache_control.h +24 -6
  46. package/include/hwy/detect_compiler_arch.h +23 -2
  47. package/include/hwy/detect_targets.h +56 -13
  48. package/include/hwy/foreach_target.h +24 -0
  49. package/include/hwy/highway.h +20 -3
  50. package/include/hwy/ops/arm_neon-inl.h +1086 -667
  51. package/include/hwy/ops/arm_sve-inl.h +1091 -235
  52. package/include/hwy/ops/emu128-inl.h +271 -196
  53. package/include/hwy/ops/generic_ops-inl.h +2270 -399
  54. package/include/hwy/ops/ppc_vsx-inl.h +1786 -563
  55. package/include/hwy/ops/rvv-inl.h +1043 -311
  56. package/include/hwy/ops/scalar-inl.h +189 -159
  57. package/include/hwy/ops/set_macros-inl.h +66 -6
  58. package/include/hwy/ops/shared-inl.h +175 -56
  59. package/include/hwy/ops/wasm_128-inl.h +153 -136
  60. package/include/hwy/ops/x86_128-inl.h +1647 -646
  61. package/include/hwy/ops/x86_256-inl.h +1003 -370
  62. package/include/hwy/ops/x86_512-inl.h +948 -353
  63. package/include/hwy/per_target.h +4 -0
  64. package/include/hwy/profiler.h +648 -0
  65. package/include/hwy/robust_statistics.h +2 -2
  66. package/include/hwy/targets.h +18 -11
  67. package/include/hwy/timer.h +11 -0
  68. package/include/libpng16/png.h +32 -29
  69. package/include/libpng16/pngconf.h +2 -2
  70. package/include/libpng16/pnglibconf.h +7 -2
  71. package/include/librsvg-2.0/librsvg/rsvg-version.h +2 -2
  72. package/include/libxml2/libxml/parser.h +16 -7
  73. package/include/libxml2/libxml/xmlIO.h +0 -1
  74. package/include/libxml2/libxml/xmlversion.h +4 -4
  75. package/include/pango-1.0/pango/pango-features.h +3 -3
  76. package/include/pango-1.0/pango/pango-fontmap.h +7 -0
  77. package/include/pixman-1/pixman-version.h +2 -2
  78. package/include/png.h +32 -29
  79. package/include/pngconf.h +2 -2
  80. package/include/pnglibconf.h +7 -2
  81. package/include/vips/connection.h +9 -3
  82. package/include/vips/util.h +0 -9
  83. package/include/vips/version.h +4 -4
  84. package/package.json +1 -1
  85. package/versions.json +11 -11
@@ -28,6 +28,8 @@
28
28
  #error "Only <girepository.h> can be included directly."
29
29
  #endif
30
30
 
31
+ #include <stdint.h>
32
+
31
33
  #include <glib.h>
32
34
  #include <glib-object.h>
33
35
 
@@ -39,6 +41,17 @@ G_BEGIN_DECLS
39
41
  typedef struct _GIBaseInfo GIBaseInfo;
40
42
  typedef struct _GIBaseInfoClass GIBaseInfoClass;
41
43
 
44
+ typedef struct
45
+ {
46
+ /*< private >*/
47
+ GTypeInstance parent_instance;
48
+
49
+ int dummy0;
50
+ void *dummy1[3];
51
+ uint32_t dummy2[2];
52
+ void *dummy3[6];
53
+ } GIBaseInfoStack;
54
+
42
55
  /* Documented in gicallableinfo.c */
43
56
  typedef struct _GICallableInfo GICallableInfo;
44
57
  GI_AVAILABLE_IN_ALL GType gi_callable_info_get_type (void);
@@ -67,6 +80,10 @@ GI_AVAILABLE_IN_ALL GType gi_union_info_get_type (void);
67
80
  typedef struct _GIEnumInfo GIEnumInfo;
68
81
  GI_AVAILABLE_IN_ALL GType gi_enum_info_get_type (void);
69
82
 
83
+ /* Documented in giflagsinfo.c */
84
+ typedef struct _GIFlagsInfo GIFlagsInfo;
85
+ GI_AVAILABLE_IN_ALL GType gi_flags_info_get_type (void);
86
+
70
87
  /* Documented in giobjectinfo.c */
71
88
  typedef struct _GIObjectInfo GIObjectInfo;
72
89
  GI_AVAILABLE_IN_ALL GType gi_object_info_get_type (void);
@@ -100,11 +117,23 @@ typedef struct _GIFieldInfo GIFieldInfo;
100
117
  GI_AVAILABLE_IN_ALL GType gi_field_info_get_type (void);
101
118
 
102
119
  /* Documented in giarginfo.c */
103
- typedef struct _GIArgInfo GIArgInfo;
120
+ typedef struct
121
+ {
122
+ /*< private >*/
123
+ GIBaseInfoStack parent;
124
+
125
+ void *padding[6];
126
+ } GIArgInfo;
104
127
  GI_AVAILABLE_IN_ALL GType gi_arg_info_get_type (void);
105
128
 
106
129
  /* Documented in gitypeinfo.c */
107
- typedef struct _GITypeInfo GITypeInfo;
130
+ typedef struct
131
+ {
132
+ /*< private >*/
133
+ GIBaseInfoStack parent;
134
+
135
+ void *padding[6];
136
+ } GITypeInfo;
108
137
  GI_AVAILABLE_IN_ALL GType gi_type_info_get_type (void);
109
138
 
110
139
  /* Documented in giunresolvedinfo.c */
@@ -113,27 +142,27 @@ GI_AVAILABLE_IN_ALL GType gi_unresolved_info_get_type (void);
113
142
 
114
143
  union _GIArgument
115
144
  {
116
- gboolean v_boolean;
117
- gint8 v_int8;
118
- guint8 v_uint8;
119
- gint16 v_int16;
120
- guint16 v_uint16;
121
- gint32 v_int32;
122
- guint32 v_uint32;
123
- gint64 v_int64;
124
- guint64 v_uint64;
125
- gfloat v_float;
126
- gdouble v_double;
127
- gshort v_short;
128
- gushort v_ushort;
129
- gint v_int;
130
- guint v_uint;
131
- glong v_long;
132
- gulong v_ulong;
133
- gssize v_ssize;
134
- gsize v_size;
135
- gchar * v_string;
136
- gpointer v_pointer;
145
+ gboolean v_boolean;
146
+ int8_t v_int8;
147
+ uint8_t v_uint8;
148
+ int16_t v_int16;
149
+ uint16_t v_uint16;
150
+ int32_t v_int32;
151
+ uint32_t v_uint32;
152
+ int64_t v_int64;
153
+ uint64_t v_uint64;
154
+ float v_float;
155
+ double v_double;
156
+ short v_short;
157
+ unsigned short v_ushort;
158
+ int v_int;
159
+ unsigned int v_uint;
160
+ long v_long;
161
+ unsigned long v_ulong;
162
+ gssize v_ssize;
163
+ size_t v_size;
164
+ char *v_string;
165
+ void *v_pointer;
137
166
  };
138
167
 
139
168
  /**
@@ -166,83 +195,6 @@ union _GIArgument
166
195
  */
167
196
  typedef union _GIArgument GIArgument;
168
197
 
169
- /**
170
- * GIInfoType:
171
- * @GI_INFO_TYPE_INVALID: invalid type
172
- * @GI_INFO_TYPE_FUNCTION: function, see [class@GIRepository.FunctionInfo]
173
- * @GI_INFO_TYPE_CALLBACK: callback, see [class@GIRepository.FunctionInfo]
174
- * @GI_INFO_TYPE_STRUCT: struct, see [class@GIRepository.StructInfo]
175
- * @GI_INFO_TYPE_BOXED: boxed, see [class@GIRepository.StructInfo] or
176
- * [class@GIRepository.UnionInfo]
177
- * @GI_INFO_TYPE_ENUM: enum, see [class@GIRepository.EnumInfo]
178
- * @GI_INFO_TYPE_FLAGS: flags, see [class@GIRepository.EnumInfo]
179
- * @GI_INFO_TYPE_OBJECT: object, see [class@GIRepository.ObjectInfo]
180
- * @GI_INFO_TYPE_INTERFACE: interface, see [class@GIRepository.InterfaceInfo]
181
- * @GI_INFO_TYPE_CONSTANT: constant, see [class@GIRepository.ConstantInfo]
182
- * @GI_INFO_TYPE_INVALID_0: deleted, used to be `GI_INFO_TYPE_ERROR_DOMAIN`.
183
- * @GI_INFO_TYPE_UNION: union, see [class@GIRepository.UnionInfo]
184
- * @GI_INFO_TYPE_VALUE: enum value, see [class@GIRepository.ValueInfo]
185
- * @GI_INFO_TYPE_SIGNAL: signal, see [class@GIRepository.SignalInfo]
186
- * @GI_INFO_TYPE_VFUNC: virtual function, see [class@GIRepository.VFuncInfo]
187
- * @GI_INFO_TYPE_PROPERTY: [class@GObject.Object] property, see
188
- * [class@GIRepository.PropertyInfo]
189
- * @GI_INFO_TYPE_FIELD: struct or union field, see
190
- * [class@GIRepository.FieldInfo]
191
- * @GI_INFO_TYPE_ARG: argument of a function or callback, see
192
- * [class@GIRepository.ArgInfo]
193
- * @GI_INFO_TYPE_TYPE: type information, see [class@GIRepository.TypeInfo]
194
- * @GI_INFO_TYPE_UNRESOLVED: unresolved type, a type which is not present in
195
- * the typelib, or any of its dependencies, see
196
- * [class@GIRepository.UnresolvedInfo]
197
- * @GI_INFO_TYPE_CALLABLE: an abstract type representing any callable (function,
198
- * callback, vfunc), see [class@GIRepository.CallableInfo]
199
- * @GI_INFO_TYPE_REGISTERED_TYPE: an abstract type representing any registered
200
- * type (enum, interface, object, struct, union), see
201
- * [class@GIRepository.RegisteredTypeInfo]
202
- *
203
- * The type of a [class@GIRepository.BaseInfo] struct.
204
- *
205
- * See [const@GIRepository.INFO_TYPE_N_TYPES] for the total number of elements
206
- * in this enum.
207
- *
208
- * Since: 2.80
209
- */
210
- typedef enum
211
- {
212
- GI_INFO_TYPE_INVALID,
213
- GI_INFO_TYPE_FUNCTION,
214
- GI_INFO_TYPE_CALLBACK,
215
- GI_INFO_TYPE_STRUCT,
216
- GI_INFO_TYPE_BOXED,
217
- GI_INFO_TYPE_ENUM, /* 5 */
218
- GI_INFO_TYPE_FLAGS,
219
- GI_INFO_TYPE_OBJECT,
220
- GI_INFO_TYPE_INTERFACE,
221
- GI_INFO_TYPE_CONSTANT,
222
- GI_INFO_TYPE_INVALID_0, /* 10 */
223
- GI_INFO_TYPE_UNION,
224
- GI_INFO_TYPE_VALUE,
225
- GI_INFO_TYPE_SIGNAL,
226
- GI_INFO_TYPE_VFUNC,
227
- GI_INFO_TYPE_PROPERTY, /* 15 */
228
- GI_INFO_TYPE_FIELD,
229
- GI_INFO_TYPE_ARG,
230
- GI_INFO_TYPE_TYPE,
231
- GI_INFO_TYPE_UNRESOLVED,
232
- GI_INFO_TYPE_CALLABLE, /* 20 */
233
- GI_INFO_TYPE_REGISTERED_TYPE,
234
- /* keep GI_INFO_TYPE_N_TYPES in sync with this */
235
- } GIInfoType;
236
-
237
- /**
238
- * GI_INFO_TYPE_N_TYPES:
239
- *
240
- * Number of entries in [enum@GIRepository.InfoType].
241
- *
242
- * Since: 2.80
243
- */
244
- #define GI_INFO_TYPE_N_TYPES (GI_INFO_TYPE_REGISTERED_TYPE + 1)
245
-
246
198
  /**
247
199
  * GITransfer:
248
200
  * @GI_TRANSFER_NOTHING: Transfer nothing from the callee (function or the type
@@ -433,7 +385,6 @@ typedef enum
433
385
  * @GI_VFUNC_MUST_CHAIN_UP: chains up to the parent type
434
386
  * @GI_VFUNC_MUST_OVERRIDE: overrides
435
387
  * @GI_VFUNC_MUST_NOT_OVERRIDE: does not override
436
- * @GI_VFUNC_THROWS: includes a [type@GLib.Error]
437
388
  *
438
389
  * Flags of a [class@GIRepository.VFuncInfo] struct.
439
390
  *
@@ -444,7 +395,6 @@ typedef enum
444
395
  GI_VFUNC_MUST_CHAIN_UP = 1 << 0,
445
396
  GI_VFUNC_MUST_OVERRIDE = 1 << 1,
446
397
  GI_VFUNC_MUST_NOT_OVERRIDE = 1 << 2,
447
- GI_VFUNC_THROWS = 1 << 3
448
398
  } GIVFuncInfoFlags;
449
399
 
450
400
  /**
@@ -454,7 +404,6 @@ typedef enum
454
404
  * @GI_FUNCTION_IS_GETTER: is a getter of a [class@GIRepository.PropertyInfo].
455
405
  * @GI_FUNCTION_IS_SETTER: is a setter of a [class@GIRepository.PropertyInfo].
456
406
  * @GI_FUNCTION_WRAPS_VFUNC: represents a virtual function.
457
- * @GI_FUNCTION_THROWS: the function may throw an error.
458
407
  *
459
408
  * Flags for a [class@GIRepository.FunctionInfo] struct.
460
409
  *
@@ -467,7 +416,6 @@ typedef enum
467
416
  GI_FUNCTION_IS_GETTER = 1 << 2,
468
417
  GI_FUNCTION_IS_SETTER = 1 << 3,
469
418
  GI_FUNCTION_WRAPS_VFUNC = 1 << 4,
470
- GI_FUNCTION_THROWS = 1 << 5
471
419
  } GIFunctionInfoFlags;
472
420
 
473
421
  G_END_DECLS
@@ -32,53 +32,69 @@
32
32
 
33
33
  G_BEGIN_DECLS
34
34
 
35
+ #define GI_TYPE_UNION_INFO (gi_union_info_get_type ())
36
+
37
+ /**
38
+ * GI_UNION_INFO:
39
+ * @info: Info object which is subject to casting.
40
+ *
41
+ * Casts a [type@GIRepository.UnionInfo] or derived pointer into a
42
+ * `(GIUnionInfo*)` pointer.
43
+ *
44
+ * Depending on the current debugging level, this function may invoke
45
+ * certain runtime checks to identify invalid casts.
46
+ *
47
+ * Since: 2.80
48
+ */
49
+ #define GI_UNION_INFO(info) (G_TYPE_CHECK_INSTANCE_CAST ((info), GI_TYPE_UNION_INFO, GIUnionInfo))
50
+
35
51
  /**
36
52
  * GI_IS_UNION_INFO:
37
53
  * @info: an info structure
38
54
  *
39
- * Checks if @info is a [struct@GIRepository.UnionInfo].
55
+ * Checks if @info is a [struct@GIRepository.UnionInfo] (or a derived type).
40
56
  *
41
57
  * Since: 2.80
42
58
  */
43
- #define GI_IS_UNION_INFO(info) \
44
- (gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_UNION)
59
+ #define GI_IS_UNION_INFO(info) (G_TYPE_CHECK_INSTANCE_TYPE ((info), GI_TYPE_UNION_INFO))
45
60
 
46
61
  GI_AVAILABLE_IN_ALL
47
- guint gi_union_info_get_n_fields (GIUnionInfo *info);
62
+ unsigned int gi_union_info_get_n_fields (GIUnionInfo *info);
48
63
 
49
64
  GI_AVAILABLE_IN_ALL
50
65
  GIFieldInfo * gi_union_info_get_field (GIUnionInfo *info,
51
- guint n);
66
+ unsigned int n);
52
67
 
53
68
  GI_AVAILABLE_IN_ALL
54
- guint gi_union_info_get_n_methods (GIUnionInfo *info);
69
+ unsigned int gi_union_info_get_n_methods (GIUnionInfo *info);
55
70
 
56
71
  GI_AVAILABLE_IN_ALL
57
72
  GIFunctionInfo * gi_union_info_get_method (GIUnionInfo *info,
58
- guint n);
73
+ unsigned int n);
59
74
 
60
75
  GI_AVAILABLE_IN_ALL
61
76
  gboolean gi_union_info_is_discriminated (GIUnionInfo *info);
62
77
 
63
78
  GI_AVAILABLE_IN_ALL
64
- guint gi_union_info_get_discriminator_offset (GIUnionInfo *info);
79
+ gboolean gi_union_info_get_discriminator_offset (GIUnionInfo *info,
80
+ size_t *out_offset);
65
81
 
66
82
  GI_AVAILABLE_IN_ALL
67
83
  GITypeInfo * gi_union_info_get_discriminator_type (GIUnionInfo *info);
68
84
 
69
85
  GI_AVAILABLE_IN_ALL
70
86
  GIConstantInfo * gi_union_info_get_discriminator (GIUnionInfo *info,
71
- guint n);
87
+ size_t n);
72
88
 
73
89
  GI_AVAILABLE_IN_ALL
74
90
  GIFunctionInfo * gi_union_info_find_method (GIUnionInfo *info,
75
- const gchar *name);
91
+ const char *name);
76
92
 
77
93
  GI_AVAILABLE_IN_ALL
78
- gsize gi_union_info_get_size (GIUnionInfo *info);
94
+ size_t gi_union_info_get_size (GIUnionInfo *info);
79
95
 
80
96
  GI_AVAILABLE_IN_ALL
81
- gsize gi_union_info_get_alignment (GIUnionInfo *info);
97
+ size_t gi_union_info_get_alignment (GIUnionInfo *info);
82
98
 
83
99
  GI_AVAILABLE_IN_ALL
84
100
  const char * gi_union_info_get_copy_function_name (GIUnionInfo *info);
@@ -31,6 +31,22 @@
31
31
 
32
32
  G_BEGIN_DECLS
33
33
 
34
+ #define GI_TYPE_UNRESOLVED_INFO (gi_unresolved_info_get_type ())
35
+
36
+ /**
37
+ * GI_UNRESOLVED_INFO:
38
+ * @info: Info object which is subject to casting.
39
+ *
40
+ * Casts a [type@GIRepository.UnresolvedInfo] or derived pointer into a
41
+ * `(GIUnresolvedInfo*)` pointer.
42
+ *
43
+ * Depending on the current debugging level, this function may invoke
44
+ * certain runtime checks to identify invalid casts.
45
+ *
46
+ * Since: 2.80
47
+ */
48
+ #define GI_UNRESOLVED_INFO(info) (G_TYPE_CHECK_INSTANCE_CAST ((info), GI_TYPE_UNRESOLVED_INFO, GIUnresolvedInfo))
49
+
34
50
  /**
35
51
  * GI_IS_UNRESOLVED_INFO:
36
52
  * @info: an info structure
@@ -39,7 +55,6 @@ G_BEGIN_DECLS
39
55
  *
40
56
  * Since: 2.80
41
57
  */
42
- #define GI_IS_UNRESOLVED_INFO(info) \
43
- (gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_UNRESOLVED)
58
+ #define GI_IS_UNRESOLVED_INFO(info) (G_TYPE_CHECK_INSTANCE_TYPE ((info), GI_TYPE_UNRESOLVED_INFO))
44
59
 
45
60
  G_END_DECLS
@@ -0,0 +1,65 @@
1
+ /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2
+ * GObject introspection: Enum and Enum values
3
+ *
4
+ * Copyright (C) 2005 Matthias Clasen
5
+ * Copyright (C) 2008,2009 Red Hat, Inc.
6
+ *
7
+ * SPDX-License-Identifier: LGPL-2.1-or-later
8
+ *
9
+ * This library is free software; you can redistribute it and/or
10
+ * modify it under the terms of the GNU Lesser General Public
11
+ * License as published by the Free Software Foundation; either
12
+ * version 2 of the License, or (at your option) any later version.
13
+ *
14
+ * This library is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
+ * Lesser General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU Lesser General Public
20
+ * License along with this library; if not, write to the
21
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22
+ * Boston, MA 02111-1307, USA.
23
+ */
24
+
25
+ #pragma once
26
+
27
+ #if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
28
+ #error "Only <girepository.h> can be included directly."
29
+ #endif
30
+
31
+ #include <girepository/gitypes.h>
32
+
33
+ G_BEGIN_DECLS
34
+
35
+ #define GI_TYPE_VALUE_INFO (gi_value_info_get_type ())
36
+
37
+ /**
38
+ * GI_VALUE_INFO:
39
+ * @info: Info object which is subject to casting.
40
+ *
41
+ * Casts a [type@GIRepository.ValueInfo] or derived pointer into a
42
+ * `(GIValueInfo*)` pointer.
43
+ *
44
+ * Depending on the current debugging level, this function may invoke
45
+ * certain runtime checks to identify invalid casts.
46
+ *
47
+ * Since: 2.80
48
+ */
49
+ #define GI_VALUE_INFO(info) (G_TYPE_CHECK_INSTANCE_CAST ((info), GI_TYPE_VALUE_INFO, GIValueInfo))
50
+
51
+ /**
52
+ * GI_IS_VALUE_INFO:
53
+ * @info: an info structure
54
+ *
55
+ * Checks if @info is a [class@GIRepository.ValueInfo] (or a derived type).
56
+ *
57
+ * Since: 2.80
58
+ */
59
+ #define GI_IS_VALUE_INFO(info) (G_TYPE_CHECK_INSTANCE_TYPE ((info), GI_TYPE_VALUE_INFO))
60
+
61
+
62
+ GI_AVAILABLE_IN_ALL
63
+ int64_t gi_value_info_get_value (GIValueInfo *info);
64
+
65
+ G_END_DECLS
@@ -32,22 +32,37 @@
32
32
 
33
33
  G_BEGIN_DECLS
34
34
 
35
+ #define GI_TYPE_VFUNC_INFO (gi_vfunc_info_get_type ())
36
+
37
+ /**
38
+ * GI_VFUNC_INFO:
39
+ * @info: Info object which is subject to casting.
40
+ *
41
+ * Casts a [type@GIRepository.VFuncInfo] or derived pointer into a
42
+ * `(GIVFuncInfo*)` pointer.
43
+ *
44
+ * Depending on the current debugging level, this function may invoke
45
+ * certain runtime checks to identify invalid casts.
46
+ *
47
+ * Since: 2.80
48
+ */
49
+ #define GI_VFUNC_INFO(info) (G_TYPE_CHECK_INSTANCE_CAST ((info), GI_TYPE_VFUNC_INFO, GIVFuncInfo))
50
+
35
51
  /**
36
52
  * GI_IS_VFUNC_INFO:
37
53
  * @info: an info structure
38
54
  *
39
- * Checks if @info is a [struct@GIRepository.VFuncInfo].
55
+ * Checks if @info is a [struct@GIRepository.VFuncInfo] (or a derived type).
40
56
  *
41
57
  * Since: 2.80
42
58
  */
43
- #define GI_IS_VFUNC_INFO(info) \
44
- (gi_base_info_get_info_type ((GIBaseInfo*) info) == GI_INFO_TYPE_VFUNC)
59
+ #define GI_IS_VFUNC_INFO(info) (G_TYPE_CHECK_INSTANCE_TYPE ((info), GI_TYPE_VFUNC_INFO))
45
60
 
46
61
  GI_AVAILABLE_IN_ALL
47
62
  GIVFuncInfoFlags gi_vfunc_info_get_flags (GIVFuncInfo *info);
48
63
 
49
64
  GI_AVAILABLE_IN_ALL
50
- guint gi_vfunc_info_get_offset (GIVFuncInfo *info);
65
+ size_t gi_vfunc_info_get_offset (GIVFuncInfo *info);
51
66
 
52
67
  GI_AVAILABLE_IN_ALL
53
68
  GISignalInfo * gi_vfunc_info_get_signal (GIVFuncInfo *info);
@@ -56,7 +71,7 @@ GI_AVAILABLE_IN_ALL
56
71
  GIFunctionInfo * gi_vfunc_info_get_invoker (GIVFuncInfo *info);
57
72
 
58
73
  GI_AVAILABLE_IN_ALL
59
- gpointer gi_vfunc_info_get_address (GIVFuncInfo *info,
74
+ void * gi_vfunc_info_get_address (GIVFuncInfo *info,
60
75
  GType implementor_gtype,
61
76
  GError **error);
62
77
 
@@ -64,9 +79,9 @@ GI_AVAILABLE_IN_ALL
64
79
  gboolean gi_vfunc_info_invoke (GIVFuncInfo *info,
65
80
  GType implementor,
66
81
  const GIArgument *in_args,
67
- gsize n_in_args,
68
- const GIArgument *out_args,
69
- gsize n_out_args,
82
+ size_t n_in_args,
83
+ GIArgument *out_args,
84
+ size_t n_out_args,
70
85
  GIArgument *return_value,
71
86
  GError **error);
72
87
 
@@ -135,10 +135,12 @@ void g_thread_foreach (GFunc thread_func,
135
135
  typedef struct
136
136
  {
137
137
  GMutex *mutex;
138
- #ifndef G_OS_WIN32
138
+ #ifndef __GI_SCANNER__
139
+ # ifndef G_OS_WIN32
139
140
  /* only for ABI compatibility reasons */
140
141
  pthread_mutex_t unused;
141
- #endif
142
+ # endif /* !G_OS_WIN32 */
143
+ #endif /* !__GI_SCANNER__ */
142
144
  } GStaticMutex GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GMutex);
143
145
 
144
146
  #define g_static_mutex_lock(mutex) \
@@ -162,15 +164,17 @@ struct _GStaticRecMutex
162
164
  GStaticMutex mutex;
163
165
  guint depth;
164
166
 
167
+ #ifndef __GI_SCANNER__
165
168
  /* ABI compat only */
166
169
  union {
167
- #ifdef G_OS_WIN32
170
+ # ifdef G_OS_WIN32
168
171
  void *owner;
169
- #else
172
+ # else
170
173
  pthread_t owner;
171
- #endif
174
+ # endif /* !G_OS_WIN32 */
172
175
  gdouble dummy;
173
176
  } unused;
177
+ #endif /* !__GI_SCANNER__ */
174
178
  } GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRecMutex);
175
179
 
176
180
  #define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, { 0 } } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_rec_mutex_init)
@@ -44,6 +44,12 @@ void g_bit_unlock (volatile gint *address,
44
44
  GLIB_AVAILABLE_IN_ALL
45
45
  void g_pointer_bit_lock (volatile void *address,
46
46
  gint lock_bit);
47
+
48
+ GLIB_AVAILABLE_IN_2_80
49
+ void g_pointer_bit_lock_and_get (gpointer address,
50
+ guint lock_bit,
51
+ guintptr *out_ptr);
52
+
47
53
  GLIB_AVAILABLE_IN_ALL
48
54
  gboolean g_pointer_bit_trylock (volatile void *address,
49
55
  gint lock_bit);
@@ -51,6 +57,19 @@ GLIB_AVAILABLE_IN_ALL
51
57
  void g_pointer_bit_unlock (volatile void *address,
52
58
  gint lock_bit);
53
59
 
60
+ GLIB_AVAILABLE_IN_2_80
61
+ gpointer g_pointer_bit_lock_mask_ptr (gpointer ptr,
62
+ guint lock_bit,
63
+ gboolean set,
64
+ guintptr preserve_mask,
65
+ gpointer preserve_ptr);
66
+
67
+ GLIB_AVAILABLE_IN_2_80
68
+ void g_pointer_bit_unlock_and_set (void *address,
69
+ guint lock_bit,
70
+ gpointer ptr,
71
+ guintptr preserve_mask);
72
+
54
73
  #ifdef __GNUC__
55
74
 
56
75
  #define g_pointer_bit_lock(address, lock_bit) \
@@ -59,6 +78,12 @@ void g_pointer_bit_unlock (volatile void *address,
59
78
  g_pointer_bit_lock ((address), (lock_bit)); \
60
79
  }))
61
80
 
81
+ #define g_pointer_bit_lock_and_get(address, lock_bit, out_ptr) \
82
+ (G_GNUC_EXTENSION ({ \
83
+ G_STATIC_ASSERT (sizeof *(address) == sizeof (gpointer)); \
84
+ g_pointer_bit_lock_and_get ((address), (lock_bit), (out_ptr)); \
85
+ }))
86
+
62
87
  #define g_pointer_bit_trylock(address, lock_bit) \
63
88
  (G_GNUC_EXTENSION ({ \
64
89
  G_STATIC_ASSERT (sizeof *(address) == sizeof (gpointer)); \
@@ -71,6 +96,12 @@ void g_pointer_bit_unlock (volatile void *address,
71
96
  g_pointer_bit_unlock ((address), (lock_bit)); \
72
97
  }))
73
98
 
99
+ #define g_pointer_bit_unlock_and_set(address, lock_bit, ptr, preserve_mask) \
100
+ (G_GNUC_EXTENSION ({ \
101
+ G_STATIC_ASSERT (sizeof *(address) == sizeof (gpointer)); \
102
+ g_pointer_bit_unlock_and_set ((address), (lock_bit), (ptr), (preserve_mask)); \
103
+ }))
104
+
74
105
  #endif
75
106
 
76
107
  G_END_DECLS
@@ -229,6 +229,11 @@ gchar *g_log_writer_format_fields (GLogLevelFlags log_level,
229
229
  gsize n_fields,
230
230
  gboolean use_color);
231
231
 
232
+ GLIB_AVAILABLE_IN_2_80
233
+ GLogWriterOutput g_log_writer_syslog (GLogLevelFlags log_level,
234
+ const GLogField *fields,
235
+ gsize n_fields,
236
+ gpointer user_data);
232
237
  GLIB_AVAILABLE_IN_2_50
233
238
  GLogWriterOutput g_log_writer_journald (GLogLevelFlags log_level,
234
239
  const GLogField *fields,
@@ -547,6 +552,9 @@ GPrintFunc g_set_printerr_handler (GPrintFunc func);
547
552
  *
548
553
  * Logs a warning if the expression is not true.
549
554
  *
555
+ * Unlike g_return_if_fail(), the expression is always evaluated, even if
556
+ * checks and assertions are disabled.
557
+ *
550
558
  * Since: 2.16
551
559
  */
552
560
  #define g_warn_if_fail(expr) \
@@ -107,10 +107,12 @@ gint64 g_slice_get_config (GSliceConfig ckey);
107
107
  GLIB_DEPRECATED_IN_2_34
108
108
  gint64* g_slice_get_config_state (GSliceConfig ckey, gint64 address, guint *n_values);
109
109
 
110
+ #ifndef __GI_SCANNER__
110
111
  #ifdef G_ENABLE_DEBUG
111
112
  GLIB_AVAILABLE_IN_ALL
112
113
  void g_slice_debug_tree_statistics (void);
113
114
  #endif
115
+ #endif
114
116
 
115
117
  G_END_DECLS
116
118
 
@@ -412,8 +412,8 @@ gboolean g_strv_equal (const gchar * const *strv1,
412
412
 
413
413
  /**
414
414
  * GNumberParserError:
415
- * @G_NUMBER_PARSER_ERROR_INVALID: String was not a valid number.
416
- * @G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS: String was a number, but out of bounds.
415
+ * @G_NUMBER_PARSER_ERROR_INVALID: string was not a valid number
416
+ * @G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS: string was a number, but out of bounds
417
417
  *
418
418
  * Error codes returned by functions converting a string to a number.
419
419
  *
@@ -456,28 +456,34 @@ gboolean g_ascii_string_to_unsigned (const gchar *str,
456
456
 
457
457
  /**
458
458
  * g_set_str: (skip)
459
- * @str_pointer: (inout) (not optional) (nullable): a pointer to either a string or %NULL
460
- * @new_str: (nullable): a string to assign to @str_pointer, or %NULL
459
+ * @str_pointer: (inout) (not optional) (nullable): a pointer to either
460
+ * a string or `NULL`
461
+ * @new_str: (nullable): a string to assign to @str_pointer
461
462
  *
462
- * Updates a pointer to a string to a copy of @new_str. The previous string
463
- * pointed to by @str_pointer will be freed with g_free().
463
+ * Updates a pointer to a string to a copy of @new_str and returns whether the
464
+ * string was changed.
464
465
  *
465
- * @str_pointer must not be %NULL, but can point to a %NULL value.
466
+ * If @new_str matches the previous string, this function is a no-op. If
467
+ * @new_str is different, a copy of it will be assigned to @str_pointer and
468
+ * the previous string pointed to by @str_pointer will be freed with
469
+ * [func@GLib.free].
470
+ *
471
+ * @str_pointer must not be `NULL`, but can point to a `NULL` value.
466
472
  *
467
473
  * One convenient usage of this function is in implementing property settings:
468
- * |[
469
- * void
470
- * foo_set_bar (Foo *foo,
471
- * const char *new_bar)
472
- * {
473
- * g_return_if_fail (IS_FOO (foo));
474
+ * ```C
475
+ * void
476
+ * foo_set_bar (Foo *foo,
477
+ * const char *new_bar)
478
+ * {
479
+ * g_return_if_fail (IS_FOO (foo));
474
480
  *
475
- * if (g_set_str (&foo->bar, new_bar))
476
- * g_object_notify (foo, "bar");
477
- * }
478
- * ]|
481
+ * if (g_set_str (&foo->bar, new_bar))
482
+ * g_object_notify (foo, "bar");
483
+ * }
484
+ * ```
479
485
  *
480
- * Returns: %TRUE if the value of @str_pointer changed, %FALSE otherwise
486
+ * Returns: true if the value of @str_pointer changed, false otherwise
481
487
  *
482
488
  * Since: 2.76
483
489
  */