@img/sharp-libvips-dev 1.0.0 → 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.
- package/include/aom/aom_encoder.h +3 -3
- package/include/aom/aomcx.h +17 -8
- package/include/expat.h +21 -10
- package/include/expat_config.h +11 -5
- package/include/ffi.h +12 -25
- package/include/fontconfig/fontconfig.h +5 -3
- package/include/freetype2/freetype/config/ftoption.h +1 -1
- package/include/gio-unix-2.0/gio/gfiledescriptorbased.h +3 -7
- package/include/gio-unix-2.0/gio/gunixinputstream.h +0 -5
- package/include/gio-unix-2.0/gio/gunixoutputstream.h +0 -5
- package/include/glib-2.0/gio/gappinfo.h +0 -7
- package/include/glib-2.0/gio/gapplication.h +6 -0
- package/include/glib-2.0/gio/gapplicationcommandline.h +12 -1
- package/include/glib-2.0/gio/gasyncinitable.h +0 -7
- package/include/glib-2.0/gio/gasyncresult.h +0 -6
- package/include/glib-2.0/gio/gbufferedinputstream.h +0 -5
- package/include/glib-2.0/gio/gbufferedoutputstream.h +0 -5
- package/include/glib-2.0/gio/gbytesicon.h +0 -5
- package/include/glib-2.0/gio/gcancellable.h +0 -5
- package/include/glib-2.0/gio/gconverter.h +0 -7
- package/include/glib-2.0/gio/gconverterinputstream.h +0 -6
- package/include/glib-2.0/gio/gconverteroutputstream.h +0 -6
- package/include/glib-2.0/gio/gdatagrambased.h +0 -7
- package/include/glib-2.0/gio/gdatainputstream.h +0 -6
- package/include/glib-2.0/gio/gdataoutputstream.h +0 -6
- package/include/glib-2.0/gio/gdbusinterface.h +0 -8
- package/include/glib-2.0/gio/gdbusinterfaceskeleton.h +0 -8
- package/include/glib-2.0/gio/gdbusmessage.h +2 -1
- package/include/glib-2.0/gio/gdbusobjectmanagerclient.h +0 -8
- package/include/glib-2.0/gio/gdbusobjectmanagerserver.h +0 -8
- package/include/glib-2.0/gio/gdbusobjectproxy.h +0 -8
- package/include/glib-2.0/gio/gdbusobjectskeleton.h +0 -8
- package/include/glib-2.0/gio/gdbusproxy.h +0 -8
- package/include/glib-2.0/gio/gdebugcontroller.h +0 -8
- package/include/glib-2.0/gio/gdebugcontrollerdbus.h +0 -7
- package/include/glib-2.0/gio/gdtlsserverconnection.h +0 -8
- package/include/glib-2.0/gio/gemblem.h +0 -5
- package/include/glib-2.0/gio/gemblemedicon.h +0 -5
- package/include/glib-2.0/gio/gfile.h +0 -10
- package/include/glib-2.0/gio/gfileenumerator.h +0 -5
- package/include/glib-2.0/gio/gfileicon.h +0 -5
- package/include/glib-2.0/gio/gfileinfo.h +0 -5
- package/include/glib-2.0/gio/gfileinputstream.h +0 -8
- package/include/glib-2.0/gio/gfileiostream.h +0 -8
- package/include/glib-2.0/gio/gfilemonitor.h +0 -5
- package/include/glib-2.0/gio/gfilenamecompleter.h +0 -5
- package/include/glib-2.0/gio/gfileoutputstream.h +0 -8
- package/include/glib-2.0/gio/gfilterinputstream.h +0 -5
- package/include/glib-2.0/gio/gfilteroutputstream.h +0 -5
- package/include/glib-2.0/gio/gicon.h +0 -5
- package/include/glib-2.0/gio/ginitable.h +0 -7
- package/include/glib-2.0/gio/ginputstream.h +0 -5
- package/include/glib-2.0/gio/gio-autocleanups.h +4 -0
- package/include/glib-2.0/gio/gio-visibility.h +34 -0
- package/include/glib-2.0/gio/gioenums.h +6 -1
- package/include/glib-2.0/gio/giomodule.h +0 -5
- package/include/glib-2.0/gio/giostream.h +0 -5
- package/include/glib-2.0/gio/giotypes.h +5 -108
- package/include/glib-2.0/gio/gloadableicon.h +0 -6
- package/include/glib-2.0/gio/gmemoryinputstream.h +0 -5
- package/include/glib-2.0/gio/gmemoryoutputstream.h +0 -5
- package/include/glib-2.0/gio/gmountoperation.h +0 -6
- package/include/glib-2.0/gio/gnetworking.h +4 -0
- package/include/glib-2.0/gio/goutputstream.h +0 -9
- package/include/glib-2.0/gio/gpollableinputstream.h +0 -7
- package/include/glib-2.0/gio/gpollableoutputstream.h +0 -7
- package/include/glib-2.0/gio/gproxy.h +0 -7
- package/include/glib-2.0/gio/gproxyaddressenumerator.h +0 -8
- package/include/glib-2.0/gio/gseekable.h +0 -5
- package/include/glib-2.0/gio/gsettingsbackend.h +0 -5
- package/include/glib-2.0/gio/gsimpleactiongroup.h +0 -7
- package/include/glib-2.0/gio/gsimpleasyncresult.h +0 -5
- package/include/glib-2.0/gio/gsimpleproxyresolver.h +0 -5
- package/include/glib-2.0/gio/gsocket.h +13 -0
- package/include/glib-2.0/gio/gsocketaddressenumerator.h +0 -6
- package/include/glib-2.0/gio/gsocketconnectable.h +0 -5
- package/include/glib-2.0/gio/gtask.h +12 -0
- package/include/glib-2.0/gio/gthemedicon.h +0 -5
- package/include/glib-2.0/gio/gtlsserverconnection.h +0 -8
- package/include/glib-2.0/gio/gunixcredentialsmessage.h +0 -8
- package/include/glib-2.0/gio/gvfs.h +0 -5
- package/include/glib-2.0/gio/gvolume.h +2 -2
- package/include/glib-2.0/gio/gvolumemonitor.h +0 -5
- package/include/glib-2.0/girepository/gi-visibility.h +986 -0
- package/include/glib-2.0/girepository/giarginfo.h +100 -0
- package/include/glib-2.0/girepository/gibaseinfo.h +129 -0
- package/include/glib-2.0/girepository/gicallableinfo.h +119 -0
- package/include/glib-2.0/girepository/gicallbackinfo.h +60 -0
- package/include/glib-2.0/girepository/giconstantinfo.h +72 -0
- package/include/glib-2.0/girepository/gienuminfo.h +82 -0
- package/include/glib-2.0/girepository/gifieldinfo.h +84 -0
- package/include/glib-2.0/girepository/giflagsinfo.h +60 -0
- package/include/glib-2.0/girepository/gifunctioninfo.h +117 -0
- package/include/glib-2.0/girepository/giinterfaceinfo.h +120 -0
- package/include/glib-2.0/girepository/giobjectinfo.h +230 -0
- package/include/glib-2.0/girepository/gipropertyinfo.h +77 -0
- package/include/glib-2.0/girepository/giregisteredtypeinfo.h +75 -0
- package/include/glib-2.0/girepository/girepository-autocleanups.h +56 -0
- package/include/glib-2.0/girepository/girepository.h +247 -0
- package/include/glib-2.0/girepository/girffi.h +129 -0
- package/include/glib-2.0/girepository/gisignalinfo.h +72 -0
- package/include/glib-2.0/girepository/gistructinfo.h +102 -0
- package/include/glib-2.0/girepository/gitypeinfo.h +144 -0
- package/include/glib-2.0/girepository/gitypelib.h +61 -0
- package/include/glib-2.0/girepository/gitypes.h +421 -0
- package/include/glib-2.0/girepository/giunioninfo.h +105 -0
- package/include/glib-2.0/girepository/giunresolvedinfo.h +60 -0
- package/include/glib-2.0/girepository/givalueinfo.h +65 -0
- package/include/glib-2.0/girepository/givfuncinfo.h +88 -0
- package/include/glib-2.0/glib/deprecated/gcompletion.h +1 -1
- package/include/glib-2.0/glib/deprecated/grel.h +0 -23
- package/include/glib-2.0/glib/deprecated/gthread.h +10 -6
- package/include/glib-2.0/glib/gatomic.h +20 -20
- package/include/glib-2.0/glib/gbitlock.h +31 -0
- package/include/glib-2.0/glib/gbookmarkfile.h +39 -1
- package/include/glib-2.0/glib/gchecksum.h +0 -10
- package/include/glib-2.0/glib/gdate.h +0 -9
- package/include/glib-2.0/glib/gdatetime.h +33 -1
- package/include/glib-2.0/glib/gdir.h +5 -0
- package/include/glib-2.0/glib/ghmac.h +0 -9
- package/include/glib-2.0/glib/glib-autocleanups.h +4 -0
- package/include/glib-2.0/glib/glib-visibility.h +34 -0
- package/include/glib-2.0/glib/gmacros.h +1 -0
- package/include/glib-2.0/glib/gmessages.h +11 -0
- package/include/glib-2.0/glib/gpathbuf.h +0 -7
- package/include/glib-2.0/glib/gslice.h +2 -0
- package/include/glib-2.0/glib/gstdio.h +1 -1
- package/include/glib-2.0/glib/gstrfuncs.h +24 -18
- package/include/glib-2.0/glib/gstrvbuilder.h +4 -8
- package/include/glib-2.0/glib/gtestutils.h +5 -0
- package/include/glib-2.0/glib/gthread.h +216 -3
- package/include/glib-2.0/glib/gunicode.h +12 -2
- package/include/glib-2.0/glib/gvarianttype.h +1 -10
- package/include/glib-2.0/glib/gversionmacros.h +9 -0
- package/include/glib-2.0/glib/gwin32.h +4 -4
- package/include/glib-2.0/glib-unix.h +214 -0
- package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
- package/include/glib-2.0/gobject/gbinding.h +0 -8
- package/include/glib-2.0/gobject/gbindinggroup.h +0 -8
- package/include/glib-2.0/gobject/gclosure.h +1 -9
- package/include/glib-2.0/gobject/genums.h +6 -6
- package/include/glib-2.0/gobject/glib-types.h +44 -0
- package/include/glib-2.0/gobject/gobject-autocleanups.h +4 -0
- package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
- package/include/glib-2.0/gobject/gobject.h +1 -16
- package/include/glib-2.0/gobject/gparam.h +3 -12
- package/include/glib-2.0/gobject/gsignal.h +16 -6
- package/include/glib-2.0/gobject/gsignalgroup.h +0 -8
- package/include/glib-2.0/gobject/gtype.h +53 -20
- package/include/glib-2.0/gobject/gtypemodule.h +0 -7
- package/include/glib-2.0/gobject/gtypeplugin.h +0 -6
- package/include/glib-2.0/gobject/gvaluearray.h +0 -7
- package/include/glib-2.0/gobject/gvaluecollector.h +1 -11
- package/include/glib-2.0/gobject/gvaluetypes.h +2 -0
- package/include/hwy/aligned_allocator.h +171 -6
- package/include/hwy/base.h +1765 -543
- package/include/hwy/cache_control.h +24 -6
- package/include/hwy/detect_compiler_arch.h +23 -2
- package/include/hwy/detect_targets.h +56 -13
- package/include/hwy/foreach_target.h +24 -0
- package/include/hwy/highway.h +20 -3
- package/include/hwy/ops/arm_neon-inl.h +1086 -667
- package/include/hwy/ops/arm_sve-inl.h +1091 -235
- package/include/hwy/ops/emu128-inl.h +271 -196
- package/include/hwy/ops/generic_ops-inl.h +2270 -399
- package/include/hwy/ops/ppc_vsx-inl.h +1786 -563
- package/include/hwy/ops/rvv-inl.h +1043 -311
- package/include/hwy/ops/scalar-inl.h +189 -159
- package/include/hwy/ops/set_macros-inl.h +66 -6
- package/include/hwy/ops/shared-inl.h +175 -56
- package/include/hwy/ops/wasm_128-inl.h +153 -136
- package/include/hwy/ops/x86_128-inl.h +1647 -646
- package/include/hwy/ops/x86_256-inl.h +1003 -370
- package/include/hwy/ops/x86_512-inl.h +948 -353
- package/include/hwy/per_target.h +4 -0
- package/include/hwy/profiler.h +648 -0
- package/include/hwy/robust_statistics.h +2 -2
- package/include/hwy/targets.h +18 -11
- package/include/hwy/timer.h +11 -0
- package/include/lcms2.h +46 -7
- package/include/lcms2_plugin.h +4 -4
- package/include/libheif/heif_version.h +2 -2
- package/include/libpng16/png.h +32 -29
- package/include/libpng16/pngconf.h +2 -2
- package/include/libpng16/pnglibconf.h +7 -2
- package/include/librsvg-2.0/librsvg/rsvg-version.h +2 -2
- package/include/libxml2/libxml/HTMLparser.h +23 -0
- package/include/libxml2/libxml/SAX.h +0 -2
- package/include/libxml2/libxml/SAX2.h +0 -2
- package/include/libxml2/libxml/c14n.h +0 -2
- package/include/libxml2/libxml/dict.h +1 -0
- package/include/libxml2/libxml/encoding.h +16 -14
- package/include/libxml2/libxml/entities.h +4 -0
- package/include/libxml2/libxml/globals.h +15 -503
- package/include/libxml2/libxml/hash.h +57 -61
- package/include/libxml2/libxml/nanoftp.h +2 -2
- package/include/libxml2/libxml/parser.h +137 -18
- package/include/libxml2/libxml/parserInternals.h +1 -0
- package/include/libxml2/libxml/relaxng.h +2 -1
- package/include/libxml2/libxml/schemasInternals.h +1 -0
- package/include/libxml2/libxml/schematron.h +1 -0
- package/include/libxml2/libxml/threads.h +4 -11
- package/include/libxml2/libxml/tree.h +68 -20
- package/include/libxml2/libxml/uri.h +2 -1
- package/include/libxml2/libxml/valid.h +2 -0
- package/include/libxml2/libxml/xmlIO.h +65 -13
- package/include/libxml2/libxml/xmlerror.h +37 -8
- package/include/libxml2/libxml/xmlmemory.h +37 -40
- package/include/libxml2/libxml/xmlreader.h +6 -0
- package/include/libxml2/libxml/xmlregexp.h +2 -9
- package/include/libxml2/libxml/xmlsave.h +9 -0
- package/include/libxml2/libxml/xmlschemas.h +3 -0
- package/include/libxml2/libxml/xmlversion.h +28 -43
- package/include/libxml2/libxml/xpath.h +1 -1
- package/include/libxml2/libxml/xpathInternals.h +2 -1
- package/include/libxml2/libxml/xpointer.h +5 -4
- package/include/pango-1.0/pango/pango-features.h +3 -3
- package/include/pango-1.0/pango/pango-fontmap.h +7 -0
- package/include/pixman-1/pixman-version.h +3 -3
- package/include/pixman-1/pixman.h +9 -2
- package/include/png.h +32 -29
- package/include/pngconf.h +2 -2
- package/include/pnglibconf.h +7 -2
- package/include/vips/connection.h +9 -3
- package/include/vips/util.h +0 -9
- package/include/vips/version.h +4 -4
- package/include/zconf.h +3 -0
- package/include/zlib.h +3 -3
- package/package.json +1 -1
- package/versions.json +15 -15
|
@@ -91,7 +91,31 @@ typedef gint64 GTimeSpan;
|
|
|
91
91
|
/**
|
|
92
92
|
* GDateTime:
|
|
93
93
|
*
|
|
94
|
-
*
|
|
94
|
+
* `GDateTime` is a structure that combines a Gregorian date and time
|
|
95
|
+
* into a single structure.
|
|
96
|
+
*
|
|
97
|
+
* `GDateTime` provides many conversion and methods to manipulate dates and times.
|
|
98
|
+
* Time precision is provided down to microseconds and the time can range
|
|
99
|
+
* (proleptically) from 0001-01-01 00:00:00 to 9999-12-31 23:59:59.999999.
|
|
100
|
+
* `GDateTime` follows POSIX time in the sense that it is oblivious to leap
|
|
101
|
+
* seconds.
|
|
102
|
+
*
|
|
103
|
+
* `GDateTime` is an immutable object; once it has been created it cannot
|
|
104
|
+
* be modified further. All modifiers will create a new `GDateTime`.
|
|
105
|
+
* Nearly all such functions can fail due to the date or time going out
|
|
106
|
+
* of range, in which case %NULL will be returned.
|
|
107
|
+
*
|
|
108
|
+
* `GDateTime` is reference counted: the reference count is increased by calling
|
|
109
|
+
* [method@GLib.DateTime.ref] and decreased by calling [method@GLib.DateTime.unref].
|
|
110
|
+
* When the reference count drops to 0, the resources allocated by the `GDateTime`
|
|
111
|
+
* structure are released.
|
|
112
|
+
*
|
|
113
|
+
* Many parts of the API may produce non-obvious results. As an
|
|
114
|
+
* example, adding two months to January 31st will yield March 31st
|
|
115
|
+
* whereas adding one month and then one month again will yield either
|
|
116
|
+
* March 28th or March 29th. Also note that adding 24 hours is not
|
|
117
|
+
* always the same as adding one day (since days containing daylight
|
|
118
|
+
* savings time transitions are either 23 or 25 hours in length).
|
|
95
119
|
*
|
|
96
120
|
* Since: 2.26
|
|
97
121
|
*/
|
|
@@ -114,6 +138,11 @@ GDateTime * g_date_time_new_from_unix_local (gint64
|
|
|
114
138
|
GLIB_AVAILABLE_IN_ALL
|
|
115
139
|
GDateTime * g_date_time_new_from_unix_utc (gint64 t);
|
|
116
140
|
|
|
141
|
+
GLIB_AVAILABLE_IN_2_80
|
|
142
|
+
GDateTime * g_date_time_new_from_unix_local_usec (gint64 usecs);
|
|
143
|
+
GLIB_AVAILABLE_IN_2_80
|
|
144
|
+
GDateTime * g_date_time_new_from_unix_utc_usec (gint64 usecs);
|
|
145
|
+
|
|
117
146
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
118
147
|
GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_new_from_unix_local)
|
|
119
148
|
GDateTime * g_date_time_new_from_timeval_local (const GTimeVal *tv);
|
|
@@ -241,6 +270,9 @@ gdouble g_date_time_get_seconds (GDateTi
|
|
|
241
270
|
|
|
242
271
|
GLIB_AVAILABLE_IN_ALL
|
|
243
272
|
gint64 g_date_time_to_unix (GDateTime *datetime);
|
|
273
|
+
GLIB_AVAILABLE_IN_2_80
|
|
274
|
+
gint64 g_date_time_to_unix_usec (GDateTime *datetime);
|
|
275
|
+
|
|
244
276
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
245
277
|
GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_to_unix)
|
|
246
278
|
gboolean g_date_time_to_timeval (GDateTime *datetime,
|
|
@@ -49,6 +49,11 @@ void g_dir_rewind (GDir *dir);
|
|
|
49
49
|
GLIB_AVAILABLE_IN_ALL
|
|
50
50
|
void g_dir_close (GDir *dir);
|
|
51
51
|
|
|
52
|
+
GLIB_AVAILABLE_IN_2_80
|
|
53
|
+
GDir * g_dir_ref (GDir *dir);
|
|
54
|
+
GLIB_AVAILABLE_IN_2_80
|
|
55
|
+
void g_dir_unref (GDir *dir);
|
|
56
|
+
|
|
52
57
|
G_END_DECLS
|
|
53
58
|
|
|
54
59
|
#endif /* __G_DIR_H__ */
|
|
@@ -30,15 +30,6 @@
|
|
|
30
30
|
|
|
31
31
|
G_BEGIN_DECLS
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* GHmac:
|
|
35
|
-
*
|
|
36
|
-
* An opaque structure representing a HMAC operation.
|
|
37
|
-
* To create a new GHmac, use g_hmac_new(). To free
|
|
38
|
-
* a GHmac, use g_hmac_unref().
|
|
39
|
-
*
|
|
40
|
-
* Since: 2.30
|
|
41
|
-
*/
|
|
42
33
|
typedef struct _GHmac GHmac;
|
|
43
34
|
|
|
44
35
|
GLIB_AVAILABLE_IN_2_30
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
#error "Only <glib.h> can be included directly."
|
|
24
24
|
#endif
|
|
25
25
|
|
|
26
|
+
#ifndef __GI_SCANNER__
|
|
27
|
+
|
|
26
28
|
static inline void
|
|
27
29
|
g_autoptr_cleanup_generic_gfree (void *p)
|
|
28
30
|
{
|
|
@@ -103,3 +105,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (GPathBuf, g_path_buf_free)
|
|
|
103
105
|
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (GPathBuf, g_path_buf_clear)
|
|
104
106
|
|
|
105
107
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
108
|
+
|
|
109
|
+
#endif /* __GI_SCANNER__ */
|
|
@@ -950,3 +950,37 @@
|
|
|
950
950
|
#define GLIB_AVAILABLE_ENUMERATOR_IN_2_78
|
|
951
951
|
#define GLIB_AVAILABLE_TYPE_IN_2_78
|
|
952
952
|
#endif
|
|
953
|
+
|
|
954
|
+
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_80
|
|
955
|
+
#define GLIB_DEPRECATED_IN_2_80 GLIB_DEPRECATED
|
|
956
|
+
#define GLIB_DEPRECATED_IN_2_80_FOR(f) GLIB_DEPRECATED_FOR (f)
|
|
957
|
+
#define GLIB_DEPRECATED_MACRO_IN_2_80 GLIB_DEPRECATED_MACRO
|
|
958
|
+
#define GLIB_DEPRECATED_MACRO_IN_2_80_FOR(f) GLIB_DEPRECATED_MACRO_FOR (f)
|
|
959
|
+
#define GLIB_DEPRECATED_ENUMERATOR_IN_2_80 GLIB_DEPRECATED_ENUMERATOR
|
|
960
|
+
#define GLIB_DEPRECATED_ENUMERATOR_IN_2_80_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR (f)
|
|
961
|
+
#define GLIB_DEPRECATED_TYPE_IN_2_80 GLIB_DEPRECATED_TYPE
|
|
962
|
+
#define GLIB_DEPRECATED_TYPE_IN_2_80_FOR(f) GLIB_DEPRECATED_TYPE_FOR (f)
|
|
963
|
+
#else
|
|
964
|
+
#define GLIB_DEPRECATED_IN_2_80 _GLIB_EXTERN
|
|
965
|
+
#define GLIB_DEPRECATED_IN_2_80_FOR(f) _GLIB_EXTERN
|
|
966
|
+
#define GLIB_DEPRECATED_MACRO_IN_2_80
|
|
967
|
+
#define GLIB_DEPRECATED_MACRO_IN_2_80_FOR(f)
|
|
968
|
+
#define GLIB_DEPRECATED_ENUMERATOR_IN_2_80
|
|
969
|
+
#define GLIB_DEPRECATED_ENUMERATOR_IN_2_80_FOR(f)
|
|
970
|
+
#define GLIB_DEPRECATED_TYPE_IN_2_80
|
|
971
|
+
#define GLIB_DEPRECATED_TYPE_IN_2_80_FOR(f)
|
|
972
|
+
#endif
|
|
973
|
+
|
|
974
|
+
#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_80
|
|
975
|
+
#define GLIB_AVAILABLE_IN_2_80 GLIB_UNAVAILABLE (2, 80)
|
|
976
|
+
#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_80 GLIB_UNAVAILABLE_STATIC_INLINE (2, 80)
|
|
977
|
+
#define GLIB_AVAILABLE_MACRO_IN_2_80 GLIB_UNAVAILABLE_MACRO (2, 80)
|
|
978
|
+
#define GLIB_AVAILABLE_ENUMERATOR_IN_2_80 GLIB_UNAVAILABLE_ENUMERATOR (2, 80)
|
|
979
|
+
#define GLIB_AVAILABLE_TYPE_IN_2_80 GLIB_UNAVAILABLE_TYPE (2, 80)
|
|
980
|
+
#else
|
|
981
|
+
#define GLIB_AVAILABLE_IN_2_80 _GLIB_EXTERN
|
|
982
|
+
#define GLIB_AVAILABLE_STATIC_INLINE_IN_2_80
|
|
983
|
+
#define GLIB_AVAILABLE_MACRO_IN_2_80
|
|
984
|
+
#define GLIB_AVAILABLE_ENUMERATOR_IN_2_80
|
|
985
|
+
#define GLIB_AVAILABLE_TYPE_IN_2_80
|
|
986
|
+
#endif
|
|
@@ -185,6 +185,7 @@
|
|
|
185
185
|
#define g_macro__has_attribute___pure__ G_GNUC_CHECK_VERSION (2, 96)
|
|
186
186
|
#define g_macro__has_attribute___sentinel__ G_GNUC_CHECK_VERSION (4, 0)
|
|
187
187
|
#define g_macro__has_attribute___unused__ G_GNUC_CHECK_VERSION (2, 4)
|
|
188
|
+
#define g_macro__has_attribute___weak__ G_GNUC_CHECK_VERSION (2, 8)
|
|
188
189
|
#define g_macro__has_attribute_cleanup G_GNUC_CHECK_VERSION (3, 3)
|
|
189
190
|
#define g_macro__has_attribute_fallthrough G_GNUC_CHECK_VERSION (6, 0)
|
|
190
191
|
#define g_macro__has_attribute_may_alias G_GNUC_CHECK_VERSION (3, 3)
|
|
@@ -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,
|
|
@@ -250,6 +255,9 @@ void g_log_writer_default_set_use_stderr (gboolean use_stderr);
|
|
|
250
255
|
GLIB_AVAILABLE_IN_2_68
|
|
251
256
|
gboolean g_log_writer_default_would_drop (GLogLevelFlags log_level,
|
|
252
257
|
const char *log_domain);
|
|
258
|
+
GLIB_AVAILABLE_IN_2_80
|
|
259
|
+
void g_log_writer_default_set_debug_domains (const gchar * const *domains);
|
|
260
|
+
|
|
253
261
|
|
|
254
262
|
/* G_MESSAGES_DEBUG enablement */
|
|
255
263
|
GLIB_AVAILABLE_IN_2_72
|
|
@@ -544,6 +552,9 @@ GPrintFunc g_set_printerr_handler (GPrintFunc func);
|
|
|
544
552
|
*
|
|
545
553
|
* Logs a warning if the expression is not true.
|
|
546
554
|
*
|
|
555
|
+
* Unlike g_return_if_fail(), the expression is always evaluated, even if
|
|
556
|
+
* checks and assertions are disabled.
|
|
557
|
+
*
|
|
547
558
|
* Since: 2.16
|
|
548
559
|
*/
|
|
549
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
|
|
|
@@ -57,7 +57,7 @@ typedef struct stat GStatBuf;
|
|
|
57
57
|
|
|
58
58
|
#endif
|
|
59
59
|
|
|
60
|
-
#if defined(G_OS_UNIX) && !defined(G_STDIO_WRAP_ON_UNIX)
|
|
60
|
+
#if defined(G_OS_UNIX) && !defined(G_STDIO_WRAP_ON_UNIX) && !defined(__GI_SCANNER__)
|
|
61
61
|
|
|
62
62
|
/* Just pass on to the system functions, so there's no potential for data
|
|
63
63
|
* format mismatches, especially with large file interfaces.
|
|
@@ -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:
|
|
416
|
-
* @G_NUMBER_PARSER_ERROR_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
|
|
460
|
-
*
|
|
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
|
|
463
|
-
*
|
|
463
|
+
* Updates a pointer to a string to a copy of @new_str and returns whether the
|
|
464
|
+
* string was changed.
|
|
464
465
|
*
|
|
465
|
-
* @
|
|
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
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
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
|
-
*
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
*
|
|
481
|
+
* if (g_set_str (&foo->bar, new_bar))
|
|
482
|
+
* g_object_notify (foo, "bar");
|
|
483
|
+
* }
|
|
484
|
+
* ```
|
|
479
485
|
*
|
|
480
|
-
* Returns:
|
|
486
|
+
* Returns: true if the value of @str_pointer changed, false otherwise
|
|
481
487
|
*
|
|
482
488
|
* Since: 2.76
|
|
483
489
|
*/
|
|
@@ -30,14 +30,6 @@
|
|
|
30
30
|
|
|
31
31
|
G_BEGIN_DECLS
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* GStrvBuilder:
|
|
35
|
-
*
|
|
36
|
-
* A helper object to build a %NULL-terminated string array
|
|
37
|
-
* by appending. See g_strv_builder_new().
|
|
38
|
-
*
|
|
39
|
-
* Since: 2.68
|
|
40
|
-
*/
|
|
41
33
|
typedef struct _GStrvBuilder GStrvBuilder;
|
|
42
34
|
|
|
43
35
|
GLIB_AVAILABLE_IN_2_68
|
|
@@ -61,6 +53,10 @@ GLIB_AVAILABLE_IN_2_70
|
|
|
61
53
|
void g_strv_builder_add_many (GStrvBuilder *builder,
|
|
62
54
|
...) G_GNUC_NULL_TERMINATED;
|
|
63
55
|
|
|
56
|
+
GLIB_AVAILABLE_IN_2_80
|
|
57
|
+
void g_strv_builder_take (GStrvBuilder *builder,
|
|
58
|
+
char *value);
|
|
59
|
+
|
|
64
60
|
GLIB_AVAILABLE_IN_2_68
|
|
65
61
|
GStrv g_strv_builder_end (GStrvBuilder *builder);
|
|
66
62
|
|
|
@@ -515,6 +515,11 @@ GLIB_AVAILABLE_IN_2_38
|
|
|
515
515
|
void g_test_trap_subprocess (const char *test_path,
|
|
516
516
|
guint64 usec_timeout,
|
|
517
517
|
GTestSubprocessFlags test_flags);
|
|
518
|
+
GLIB_AVAILABLE_IN_2_80
|
|
519
|
+
void g_test_trap_subprocess_with_envp (const char *test_path,
|
|
520
|
+
const char * const *envp,
|
|
521
|
+
guint64 usec_timeout,
|
|
522
|
+
GTestSubprocessFlags test_flags);
|
|
518
523
|
|
|
519
524
|
GLIB_AVAILABLE_IN_ALL
|
|
520
525
|
gboolean g_test_trap_has_passed (void);
|
|
@@ -139,6 +139,10 @@ struct _GOnce
|
|
|
139
139
|
# define G_TRYLOCK(name) g_mutex_trylock (&G_LOCK_NAME (name))
|
|
140
140
|
#endif /* !G_DEBUG_LOCKS */
|
|
141
141
|
|
|
142
|
+
#ifdef g_autoptr
|
|
143
|
+
#define G_AUTO_LOCK(name) G_MUTEX_AUTO_LOCK (&G_LOCK_NAME (name), g__##name##_locker)
|
|
144
|
+
#endif /* g_autoptr */
|
|
145
|
+
|
|
142
146
|
GLIB_AVAILABLE_IN_2_32
|
|
143
147
|
GThread * g_thread_ref (GThread *thread);
|
|
144
148
|
GLIB_AVAILABLE_IN_2_32
|
|
@@ -236,6 +240,12 @@ GLIB_AVAILABLE_IN_ALL
|
|
|
236
240
|
void g_once_init_leave (volatile void *location,
|
|
237
241
|
gsize result);
|
|
238
242
|
|
|
243
|
+
GLIB_AVAILABLE_IN_2_80
|
|
244
|
+
gboolean g_once_init_enter_pointer (void *location);
|
|
245
|
+
GLIB_AVAILABLE_IN_2_80
|
|
246
|
+
void g_once_init_leave_pointer (void *location,
|
|
247
|
+
gpointer result);
|
|
248
|
+
|
|
239
249
|
/* Use C11-style atomic extensions to check the fast path for status=ready. If
|
|
240
250
|
* they are not available, fall back to using a mutex and condition variable in
|
|
241
251
|
* g_once_impl().
|
|
@@ -268,11 +278,30 @@ void g_once_init_leave (volatile void *location,
|
|
|
268
278
|
0 ? (void) (*(location) = (result)) : (void) 0; \
|
|
269
279
|
g_once_init_leave ((location), (gsize) (result)); \
|
|
270
280
|
}))
|
|
281
|
+
# define g_once_init_enter_pointer(location) \
|
|
282
|
+
(G_GNUC_EXTENSION ({ \
|
|
283
|
+
G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer)); \
|
|
284
|
+
(void) (0 ? (gpointer) * (location) : NULL); \
|
|
285
|
+
(!g_atomic_pointer_get (location) && \
|
|
286
|
+
g_once_init_enter_pointer (location)); \
|
|
287
|
+
})) GLIB_AVAILABLE_MACRO_IN_2_80
|
|
288
|
+
# define g_once_init_leave_pointer(location, result) \
|
|
289
|
+
(G_GNUC_EXTENSION ({ \
|
|
290
|
+
G_STATIC_ASSERT (sizeof *(location) == sizeof (gpointer)); \
|
|
291
|
+
0 ? (void) (*(location) = (result)) : (void) 0; \
|
|
292
|
+
g_once_init_leave_pointer ((location), (gpointer) (guintptr) (result)); \
|
|
293
|
+
})) GLIB_AVAILABLE_MACRO_IN_2_80
|
|
271
294
|
#else
|
|
272
295
|
# define g_once_init_enter(location) \
|
|
273
296
|
(g_once_init_enter((location)))
|
|
274
297
|
# define g_once_init_leave(location, result) \
|
|
275
298
|
(g_once_init_leave((location), (gsize) (result)))
|
|
299
|
+
# define g_once_init_enter_pointer(location) \
|
|
300
|
+
(g_once_init_enter_pointer((location))) \
|
|
301
|
+
GLIB_AVAILABLE_MACRO_IN_2_80
|
|
302
|
+
# define g_once_init_leave_pointer(location, result) \
|
|
303
|
+
(g_once_init_leave_pointer((location), (gpointer) (guintptr) (result))) \
|
|
304
|
+
GLIB_AVAILABLE_MACRO_IN_2_80
|
|
276
305
|
#endif
|
|
277
306
|
|
|
278
307
|
GLIB_AVAILABLE_IN_2_36
|
|
@@ -314,7 +343,7 @@ typedef void GMutexLocker;
|
|
|
314
343
|
*
|
|
315
344
|
* // Code with mutex locked here
|
|
316
345
|
*
|
|
317
|
-
* if (
|
|
346
|
+
* if (condition)
|
|
318
347
|
* // No need to unlock
|
|
319
348
|
* return;
|
|
320
349
|
*
|
|
@@ -325,6 +354,10 @@ typedef void GMutexLocker;
|
|
|
325
354
|
* }
|
|
326
355
|
* ]|
|
|
327
356
|
*
|
|
357
|
+
* Note that it is common for the declared variable to not be used in the scope,
|
|
358
|
+
* which causes some compilers to warn. That can be avoided by using
|
|
359
|
+
* `G_GNUC_UNUSED` or, since 2.80, [func@GLib.MUTEX_AUTO_LOCK].
|
|
360
|
+
*
|
|
328
361
|
* Returns: a #GMutexLocker
|
|
329
362
|
* Since: 2.44
|
|
330
363
|
*/
|
|
@@ -353,6 +386,49 @@ g_mutex_locker_free (GMutexLocker *locker)
|
|
|
353
386
|
g_mutex_unlock ((GMutex *) locker);
|
|
354
387
|
}
|
|
355
388
|
|
|
389
|
+
/**
|
|
390
|
+
* G_MUTEX_AUTO_LOCK:
|
|
391
|
+
* @mutex: a [type@GLib.Mutex]
|
|
392
|
+
* @var: a variable name to be declared
|
|
393
|
+
*
|
|
394
|
+
* Declare a [type@GLib.MutexLocker] variable with `g_autoptr()` and lock the
|
|
395
|
+
* mutex. The mutex will be unlocked automatically when leaving the scope. The
|
|
396
|
+
* variable is declared with `G_GNUC_UNUSED` to avoid compiler warning if it is
|
|
397
|
+
* not used in the scope.
|
|
398
|
+
*
|
|
399
|
+
* This feature is only supported on GCC and clang. This macro is not defined on
|
|
400
|
+
* other compilers and should not be used in programs that are intended to be
|
|
401
|
+
* portable to those compilers.
|
|
402
|
+
*
|
|
403
|
+
* Note that this should be used in a place where it is allowed to declare a
|
|
404
|
+
* variable, which could be before any statement in the case
|
|
405
|
+
* `-Wdeclaration-after-statement` is used, or C standard prior to C99.
|
|
406
|
+
*
|
|
407
|
+
* ```c
|
|
408
|
+
* {
|
|
409
|
+
* G_MUTEX_AUTO_LOCK (&obj->mutex, locker);
|
|
410
|
+
*
|
|
411
|
+
* obj->stuff_with_lock ();
|
|
412
|
+
* if (condition)
|
|
413
|
+
* {
|
|
414
|
+
* // No need to unlock
|
|
415
|
+
* return;
|
|
416
|
+
* }
|
|
417
|
+
*
|
|
418
|
+
* // Unlock before end of scope
|
|
419
|
+
* g_clear_pointer (&locker, g_mutex_locker_free);
|
|
420
|
+
* obj->stuff_without_lock ();
|
|
421
|
+
* }
|
|
422
|
+
* ```
|
|
423
|
+
*
|
|
424
|
+
* Since: 2.80.0
|
|
425
|
+
*/
|
|
426
|
+
#ifdef g_autoptr
|
|
427
|
+
#define G_MUTEX_AUTO_LOCK(mutex, var) \
|
|
428
|
+
GLIB_AVAILABLE_MACRO_IN_2_80 g_autoptr (GMutexLocker) \
|
|
429
|
+
G_GNUC_UNUSED var = g_mutex_locker_new (mutex)
|
|
430
|
+
#endif /* g_autoptr */
|
|
431
|
+
|
|
356
432
|
/**
|
|
357
433
|
* GRecMutexLocker:
|
|
358
434
|
*
|
|
@@ -389,7 +465,7 @@ typedef void GRecMutexLocker;
|
|
|
389
465
|
*
|
|
390
466
|
* // Code with rec_mutex locked here
|
|
391
467
|
*
|
|
392
|
-
* if (
|
|
468
|
+
* if (condition)
|
|
393
469
|
* // No need to unlock
|
|
394
470
|
* return;
|
|
395
471
|
*
|
|
@@ -400,6 +476,10 @@ typedef void GRecMutexLocker;
|
|
|
400
476
|
* }
|
|
401
477
|
* ]|
|
|
402
478
|
*
|
|
479
|
+
* Note that it is common for the declared variable to not be used in the scope,
|
|
480
|
+
* which causes some compilers to warn. That can be avoided by using
|
|
481
|
+
* `G_GNUC_UNUSED` or, since 2.80, [func@GLib.REC_MUTEX_AUTO_LOCK].
|
|
482
|
+
*
|
|
403
483
|
* Returns: a #GRecMutexLocker
|
|
404
484
|
* Since: 2.60
|
|
405
485
|
*/
|
|
@@ -432,6 +512,49 @@ g_rec_mutex_locker_free (GRecMutexLocker *locker)
|
|
|
432
512
|
}
|
|
433
513
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
434
514
|
|
|
515
|
+
/**
|
|
516
|
+
* G_REC_MUTEX_AUTO_LOCK:
|
|
517
|
+
* @mutex: a [type@GLib.RecMutex]
|
|
518
|
+
* @var: a variable name to be declared
|
|
519
|
+
*
|
|
520
|
+
* Declare a [type@GLib.RecMutexLocker] variable with `g_autoptr()` and lock the
|
|
521
|
+
* mutex. The mutex will be unlocked automatically when leaving the scope. The
|
|
522
|
+
* variable is declared with `G_GNUC_UNUSED` to avoid compiler warning if it is
|
|
523
|
+
* not used in the scope.
|
|
524
|
+
*
|
|
525
|
+
* This feature is only supported on GCC and clang. This macro is not defined on
|
|
526
|
+
* other compilers and should not be used in programs that are intended to be
|
|
527
|
+
* portable to those compilers.
|
|
528
|
+
*
|
|
529
|
+
* Note that this should be used in a place where it is allowed to declare a
|
|
530
|
+
* variable, which could be before any statement in the case
|
|
531
|
+
* `-Wdeclaration-after-statement` is used, or C standard prior to C99.
|
|
532
|
+
*
|
|
533
|
+
* ```c
|
|
534
|
+
* {
|
|
535
|
+
* G_REC_MUTEX_AUTO_LOCK (&obj->rec_mutex, locker);
|
|
536
|
+
*
|
|
537
|
+
* obj->stuff_with_lock ();
|
|
538
|
+
* if (condition)
|
|
539
|
+
* {
|
|
540
|
+
* // No need to unlock
|
|
541
|
+
* return;
|
|
542
|
+
* }
|
|
543
|
+
*
|
|
544
|
+
* // Unlock before end of scope
|
|
545
|
+
* g_clear_pointer (&locker, g_rec_mutex_locker_free);
|
|
546
|
+
* obj->stuff_without_lock ();
|
|
547
|
+
* }
|
|
548
|
+
* ```
|
|
549
|
+
*
|
|
550
|
+
* Since: 2.80.0
|
|
551
|
+
*/
|
|
552
|
+
#ifdef g_autoptr
|
|
553
|
+
#define G_REC_MUTEX_AUTO_LOCK(mutex, var) \
|
|
554
|
+
GLIB_AVAILABLE_MACRO_IN_2_80 g_autoptr (GRecMutexLocker) \
|
|
555
|
+
G_GNUC_UNUSED var = g_rec_mutex_locker_new (mutex)
|
|
556
|
+
#endif /* g_autoptr */
|
|
557
|
+
|
|
435
558
|
/**
|
|
436
559
|
* GRWLockWriterLocker:
|
|
437
560
|
*
|
|
@@ -495,7 +618,7 @@ typedef void GRWLockWriterLocker;
|
|
|
495
618
|
* if (self->array == NULL)
|
|
496
619
|
* self->array = g_ptr_array_new ();
|
|
497
620
|
*
|
|
498
|
-
* if (
|
|
621
|
+
* if (condition)
|
|
499
622
|
* // No need to unlock
|
|
500
623
|
* return;
|
|
501
624
|
*
|
|
@@ -510,6 +633,10 @@ typedef void GRWLockWriterLocker;
|
|
|
510
633
|
* }
|
|
511
634
|
* ]|
|
|
512
635
|
*
|
|
636
|
+
* Note that it is common for the declared variable to not be used in the scope,
|
|
637
|
+
* which causes some compilers to warn. That can be avoided by using
|
|
638
|
+
* `G_GNUC_UNUSED` or, since 2.80, [func@GLib.RW_LOCK_WRITER_AUTO_LOCK].
|
|
639
|
+
*
|
|
513
640
|
* Returns: a #GRWLockWriterLocker
|
|
514
641
|
* Since: 2.62
|
|
515
642
|
*/
|
|
@@ -543,6 +670,49 @@ g_rw_lock_writer_locker_free (GRWLockWriterLocker *locker)
|
|
|
543
670
|
}
|
|
544
671
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
545
672
|
|
|
673
|
+
/**
|
|
674
|
+
* G_RW_LOCK_WRITER_AUTO_LOCK:
|
|
675
|
+
* @mutex: a [type@GLib.RWLock]
|
|
676
|
+
* @var: a variable name to be declared
|
|
677
|
+
*
|
|
678
|
+
* Declare a [type@GLib.RWLockWriterLocker] variable with `g_autoptr()` and lock
|
|
679
|
+
* for writing. The mutex will be unlocked automatically when leaving the scope.
|
|
680
|
+
* The variable is declared with `G_GNUC_UNUSED` to avoid compiler warning if it
|
|
681
|
+
* is not used in the scope.
|
|
682
|
+
*
|
|
683
|
+
* This feature is only supported on GCC and clang. This macro is not defined on
|
|
684
|
+
* other compilers and should not be used in programs that are intended to be
|
|
685
|
+
* portable to those compilers.
|
|
686
|
+
*
|
|
687
|
+
* Note that this should be used in a place where it is allowed to declare a
|
|
688
|
+
* variable, which could be before any statement in the case
|
|
689
|
+
* `-Wdeclaration-after-statement` is used, or C standard prior to C99.
|
|
690
|
+
*
|
|
691
|
+
* ```c
|
|
692
|
+
* {
|
|
693
|
+
* G_RW_LOCK_WRITER_AUTO_LOCK (&obj->rw_lock, locker);
|
|
694
|
+
*
|
|
695
|
+
* obj->stuff_with_lock ();
|
|
696
|
+
* if (condition)
|
|
697
|
+
* {
|
|
698
|
+
* // No need to unlock
|
|
699
|
+
* return;
|
|
700
|
+
* }
|
|
701
|
+
*
|
|
702
|
+
* // Unlock before end of scope
|
|
703
|
+
* g_clear_pointer (&locker, g_rw_lock_writer_locker_free);
|
|
704
|
+
* obj->stuff_without_lock ();
|
|
705
|
+
* }
|
|
706
|
+
* ```
|
|
707
|
+
*
|
|
708
|
+
* Since: 2.80.0
|
|
709
|
+
*/
|
|
710
|
+
#ifdef g_autoptr
|
|
711
|
+
#define G_RW_LOCK_WRITER_AUTO_LOCK(mutex, var) \
|
|
712
|
+
GLIB_AVAILABLE_MACRO_IN_2_80 g_autoptr (GRWLockWriterLocker) \
|
|
713
|
+
G_GNUC_UNUSED var = g_rw_lock_writer_locker_new (mutex)
|
|
714
|
+
#endif /* g_autoptr */
|
|
715
|
+
|
|
546
716
|
/**
|
|
547
717
|
* GRWLockReaderLocker:
|
|
548
718
|
*
|
|
@@ -598,6 +768,49 @@ g_rw_lock_reader_locker_free (GRWLockReaderLocker *locker)
|
|
|
598
768
|
}
|
|
599
769
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
600
770
|
|
|
771
|
+
/**
|
|
772
|
+
* G_RW_LOCK_READER_AUTO_LOCK:
|
|
773
|
+
* @mutex: a [type@GLib.RWLock]
|
|
774
|
+
* @var: a variable name to be declared
|
|
775
|
+
*
|
|
776
|
+
* Declare a [type@GLib.RWLockReaderLocker] variable with `g_autoptr()` and lock
|
|
777
|
+
* for reading. The mutex will be unlocked automatically when leaving the scope.
|
|
778
|
+
* The variable is declared with `G_GNUC_UNUSED` to avoid compiler warning if it
|
|
779
|
+
* is not used in the scope.
|
|
780
|
+
*
|
|
781
|
+
* This feature is only supported on GCC and clang. This macro is not defined on
|
|
782
|
+
* other compilers and should not be used in programs that are intended to be
|
|
783
|
+
* portable to those compilers.
|
|
784
|
+
*
|
|
785
|
+
* Note that this should be used in a place where it is allowed to declare a
|
|
786
|
+
* variable, which could be before any statement in the case
|
|
787
|
+
* `-Wdeclaration-after-statement` is used, or C standard prior to C99.
|
|
788
|
+
*
|
|
789
|
+
* ```c
|
|
790
|
+
* {
|
|
791
|
+
* G_RW_LOCK_READER_AUTO_LOCK (&obj->rw_lock, locker);
|
|
792
|
+
*
|
|
793
|
+
* obj->stuff_with_lock ();
|
|
794
|
+
* if (condition)
|
|
795
|
+
* {
|
|
796
|
+
* // No need to unlock
|
|
797
|
+
* return;
|
|
798
|
+
* }
|
|
799
|
+
*
|
|
800
|
+
* // Unlock before end of scope
|
|
801
|
+
* g_clear_pointer (&locker, g_rw_lock_reader_locker_free);
|
|
802
|
+
* obj->stuff_without_lock ();
|
|
803
|
+
* }
|
|
804
|
+
* ```
|
|
805
|
+
*
|
|
806
|
+
* Since: 2.80.0
|
|
807
|
+
*/
|
|
808
|
+
#ifdef g_autoptr
|
|
809
|
+
#define G_RW_LOCK_READER_AUTO_LOCK(mutex, var) \
|
|
810
|
+
GLIB_AVAILABLE_MACRO_IN_2_80 g_autoptr (GRWLockReaderLocker) \
|
|
811
|
+
G_GNUC_UNUSED var = g_rw_lock_reader_locker_new (mutex)
|
|
812
|
+
#endif /* g_autoptr */
|
|
813
|
+
|
|
601
814
|
G_END_DECLS
|
|
602
815
|
|
|
603
816
|
#endif /* __G_THREAD_H__ */
|
|
@@ -204,10 +204,15 @@ typedef enum
|
|
|
204
204
|
* @G_UNICODE_BREAK_EMOJI_BASE: Emoji Base (EB). Since: 2.50
|
|
205
205
|
* @G_UNICODE_BREAK_EMOJI_MODIFIER: Emoji Modifier (EM). Since: 2.50
|
|
206
206
|
* @G_UNICODE_BREAK_ZERO_WIDTH_JOINER: Zero Width Joiner (ZWJ). Since: 2.50
|
|
207
|
+
* @G_UNICODE_BREAK_AKSARA: Aksara (AK). Since: 2.80
|
|
208
|
+
* @G_UNICODE_BREAK_AKSARA_PRE_BASE (AP). Since: 2.80
|
|
209
|
+
* @G_UNICODE_BREAK_AKSARA_START (AS). Since: 2.80
|
|
210
|
+
* @G_UNICODE_BREAK_VIRAMA_FINAL (VF). Since: 2.80
|
|
211
|
+
* @G_UNICODE_BREAK_VIRAMA (VI). Since: 2.80
|
|
207
212
|
*
|
|
208
213
|
* These are the possible line break classifications.
|
|
209
214
|
*
|
|
210
|
-
* Since new
|
|
215
|
+
* Since new Unicode versions may add new types here, applications should be ready
|
|
211
216
|
* to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN.
|
|
212
217
|
*
|
|
213
218
|
* See [Unicode Line Breaking Algorithm](https://www.unicode.org/reports/tr14/).
|
|
@@ -257,7 +262,12 @@ typedef enum
|
|
|
257
262
|
G_UNICODE_BREAK_REGIONAL_INDICATOR,
|
|
258
263
|
G_UNICODE_BREAK_EMOJI_BASE,
|
|
259
264
|
G_UNICODE_BREAK_EMOJI_MODIFIER,
|
|
260
|
-
G_UNICODE_BREAK_ZERO_WIDTH_JOINER
|
|
265
|
+
G_UNICODE_BREAK_ZERO_WIDTH_JOINER,
|
|
266
|
+
G_UNICODE_BREAK_AKSARA,
|
|
267
|
+
G_UNICODE_BREAK_AKSARA_PRE_BASE,
|
|
268
|
+
G_UNICODE_BREAK_AKSARA_START,
|
|
269
|
+
G_UNICODE_BREAK_VIRAMA_FINAL,
|
|
270
|
+
G_UNICODE_BREAK_VIRAMA
|
|
261
271
|
} GUnicodeBreakType;
|
|
262
272
|
|
|
263
273
|
/**
|
|
@@ -31,15 +31,6 @@
|
|
|
31
31
|
|
|
32
32
|
G_BEGIN_DECLS
|
|
33
33
|
|
|
34
|
-
/**
|
|
35
|
-
* GVariantType:
|
|
36
|
-
*
|
|
37
|
-
* A type in the GVariant type system.
|
|
38
|
-
*
|
|
39
|
-
* Two types may not be compared by value; use g_variant_type_equal() or
|
|
40
|
-
* g_variant_type_is_subtype_of(). May be copied using
|
|
41
|
-
* g_variant_type_copy() and freed using g_variant_type_free().
|
|
42
|
-
**/
|
|
43
34
|
typedef struct _GVariantType GVariantType;
|
|
44
35
|
|
|
45
36
|
/**
|
|
@@ -375,7 +366,7 @@ GVariantType * g_variant_type_new_dict_entry (const G
|
|
|
375
366
|
|
|
376
367
|
/*< private >*/
|
|
377
368
|
GLIB_AVAILABLE_IN_ALL
|
|
378
|
-
const GVariantType * g_variant_type_checked_ (const gchar *);
|
|
369
|
+
const GVariantType * g_variant_type_checked_ (const gchar *type_string);
|
|
379
370
|
GLIB_AVAILABLE_IN_2_60
|
|
380
371
|
gsize g_variant_type_string_get_depth_ (const gchar *type_string);
|
|
381
372
|
|