@img/sharp-libvips-dev-wasm32 1.3.2 → 1.3.3-rc.0
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/expat.h +3 -1
- package/include/expat_config.h +3 -3
- package/include/expat_external.h +2 -0
- package/include/ffi.h +39 -5
- package/include/glib-2.0/gio/gaction.h +1 -1
- package/include/glib-2.0/gio/gactiongroup.h +1 -1
- package/include/glib-2.0/gio/gactionmap.h +1 -1
- package/include/glib-2.0/gio/gappinfo.h +2 -2
- package/include/glib-2.0/gio/gapplication.h +1 -1
- package/include/glib-2.0/gio/gapplicationcommandline.h +1 -1
- package/include/glib-2.0/gio/gasyncinitable.h +1 -1
- package/include/glib-2.0/gio/gasyncresult.h +1 -1
- package/include/glib-2.0/gio/gbufferedinputstream.h +1 -1
- package/include/glib-2.0/gio/gbufferedoutputstream.h +1 -1
- package/include/glib-2.0/gio/gbytesicon.h +1 -1
- package/include/glib-2.0/gio/gcancellable.h +1 -1
- package/include/glib-2.0/gio/gcharsetconverter.h +1 -1
- package/include/glib-2.0/gio/gconverter.h +1 -1
- package/include/glib-2.0/gio/gconverterinputstream.h +1 -1
- package/include/glib-2.0/gio/gconverteroutputstream.h +1 -1
- package/include/glib-2.0/gio/gcredentials.h +1 -1
- package/include/glib-2.0/gio/gdatainputstream.h +1 -1
- package/include/glib-2.0/gio/gdataoutputstream.h +1 -1
- package/include/glib-2.0/gio/gdbusactiongroup.h +2 -13
- package/include/glib-2.0/gio/gdbusauthobserver.h +1 -1
- package/include/glib-2.0/gio/gdbusconnection.h +1 -1
- package/include/glib-2.0/gio/gdbusinterface.h +1 -1
- package/include/glib-2.0/gio/gdbusinterfaceskeleton.h +1 -1
- package/include/glib-2.0/gio/gdbusintrospection.h +7 -7
- package/include/glib-2.0/gio/gdbusmenumodel.h +1 -1
- package/include/glib-2.0/gio/gdbusmessage.h +1 -1
- package/include/glib-2.0/gio/gdbusmethodinvocation.h +1 -1
- package/include/glib-2.0/gio/gdbusobject.h +1 -1
- package/include/glib-2.0/gio/gdbusobjectmanager.h +1 -1
- package/include/glib-2.0/gio/gdbusobjectmanagerclient.h +1 -1
- package/include/glib-2.0/gio/gdbusobjectmanagerserver.h +1 -1
- package/include/glib-2.0/gio/gdbusobjectproxy.h +1 -1
- package/include/glib-2.0/gio/gdbusobjectskeleton.h +1 -1
- package/include/glib-2.0/gio/gdbusproxy.h +1 -1
- package/include/glib-2.0/gio/gdbusserver.h +1 -1
- package/include/glib-2.0/gio/gdrive.h +1 -1
- package/include/glib-2.0/gio/gdtlsclientconnection.h +1 -1
- package/include/glib-2.0/gio/gdtlsconnection.h +1 -1
- package/include/glib-2.0/gio/gdtlsserverconnection.h +1 -1
- package/include/glib-2.0/gio/gemblem.h +2 -11
- package/include/glib-2.0/gio/gemblemedicon.h +1 -1
- package/include/glib-2.0/gio/gfile.h +1 -1
- package/include/glib-2.0/gio/gfileenumerator.h +1 -1
- package/include/glib-2.0/gio/gfileicon.h +1 -1
- package/include/glib-2.0/gio/gfileinfo.h +2 -2
- package/include/glib-2.0/gio/gfileinputstream.h +1 -1
- package/include/glib-2.0/gio/gfileiostream.h +1 -1
- package/include/glib-2.0/gio/gfilemonitor.h +1 -1
- package/include/glib-2.0/gio/gfilenamecompleter.h +1 -1
- package/include/glib-2.0/gio/gfileoutputstream.h +1 -1
- package/include/glib-2.0/gio/gfilterinputstream.h +1 -1
- package/include/glib-2.0/gio/gfilteroutputstream.h +1 -1
- package/include/glib-2.0/gio/gicon.h +1 -1
- package/include/glib-2.0/gio/ginetaddress.h +1 -1
- package/include/glib-2.0/gio/ginetaddressmask.h +1 -1
- package/include/glib-2.0/gio/ginetsocketaddress.h +1 -1
- package/include/glib-2.0/gio/ginitable.h +1 -1
- package/include/glib-2.0/gio/ginputstream.h +1 -1
- package/include/glib-2.0/gio/gio-autocleanups.h +0 -2
- package/include/glib-2.0/gio/gioenums.h +29 -10
- package/include/glib-2.0/gio/gioenumtypes.h +83 -83
- package/include/glib-2.0/gio/giomodule.h +1 -1
- package/include/glib-2.0/gio/giostream.h +1 -1
- package/include/glib-2.0/gio/gloadableicon.h +1 -1
- package/include/glib-2.0/gio/gmemoryinputstream.h +1 -1
- package/include/glib-2.0/gio/gmemoryoutputstream.h +1 -1
- package/include/glib-2.0/gio/gmenu.h +2 -2
- package/include/glib-2.0/gio/gmenumodel.h +3 -3
- package/include/glib-2.0/gio/gmount.h +1 -1
- package/include/glib-2.0/gio/gmountoperation.h +1 -1
- package/include/glib-2.0/gio/gnativesocketaddress.h +1 -1
- package/include/glib-2.0/gio/gnativevolumemonitor.h +1 -1
- package/include/glib-2.0/gio/gnetworkaddress.h +1 -1
- package/include/glib-2.0/gio/gnetworkmonitor.h +1 -1
- package/include/glib-2.0/gio/gnetworkservice.h +1 -1
- package/include/glib-2.0/gio/gnotification.h +1 -1
- package/include/glib-2.0/gio/goutputstream.h +1 -1
- package/include/glib-2.0/gio/gpollableinputstream.h +1 -1
- package/include/glib-2.0/gio/gpollableoutputstream.h +1 -1
- package/include/glib-2.0/gio/gpropertyaction.h +1 -1
- package/include/glib-2.0/gio/gproxy.h +1 -1
- package/include/glib-2.0/gio/gproxyaddress.h +1 -1
- package/include/glib-2.0/gio/gproxyaddressenumerator.h +1 -1
- package/include/glib-2.0/gio/gproxyresolver.h +1 -1
- package/include/glib-2.0/gio/gremoteactiongroup.h +1 -1
- package/include/glib-2.0/gio/gresolver.h +1 -1
- package/include/glib-2.0/gio/gresource.h +1 -1
- package/include/glib-2.0/gio/gseekable.h +1 -1
- package/include/glib-2.0/gio/gsettingsschema.h +3 -3
- package/include/glib-2.0/gio/gsimpleaction.h +1 -1
- package/include/glib-2.0/gio/gsimpleactiongroup.h +1 -1
- package/include/glib-2.0/gio/gsimpleasyncresult.h +1 -1
- package/include/glib-2.0/gio/gsimpleiostream.h +1 -1
- package/include/glib-2.0/gio/gsimpleproxyresolver.h +1 -1
- package/include/glib-2.0/gio/gsocket.h +1 -1
- package/include/glib-2.0/gio/gsocketaddress.h +1 -1
- package/include/glib-2.0/gio/gsocketaddressenumerator.h +1 -1
- package/include/glib-2.0/gio/gsocketclient.h +1 -1
- package/include/glib-2.0/gio/gsocketconnectable.h +1 -1
- package/include/glib-2.0/gio/gsocketconnection.h +1 -1
- package/include/glib-2.0/gio/gsocketcontrolmessage.h +1 -1
- package/include/glib-2.0/gio/gsocketlistener.h +1 -1
- package/include/glib-2.0/gio/gsrvtarget.h +1 -1
- package/include/glib-2.0/gio/gsubprocess.h +1 -1
- package/include/glib-2.0/gio/gsubprocesslauncher.h +1 -1
- package/include/glib-2.0/gio/gtask.h +1 -1
- package/include/glib-2.0/gio/gtcpconnection.h +1 -1
- package/include/glib-2.0/gio/gtcpwrapperconnection.h +1 -1
- package/include/glib-2.0/gio/gtestdbus.h +1 -1
- package/include/glib-2.0/gio/gthemedicon.h +1 -1
- package/include/glib-2.0/gio/gtlsbackend.h +1 -1
- package/include/glib-2.0/gio/gtlscertificate.h +1 -1
- package/include/glib-2.0/gio/gtlsclientconnection.h +1 -1
- package/include/glib-2.0/gio/gtlsconnection.h +1 -1
- package/include/glib-2.0/gio/gtlsdatabase.h +1 -1
- package/include/glib-2.0/gio/gtlsfiledatabase.h +1 -1
- package/include/glib-2.0/gio/gtlsinteraction.h +1 -1
- package/include/glib-2.0/gio/gtlspassword.h +1 -1
- package/include/glib-2.0/gio/gtlsserverconnection.h +1 -1
- package/include/glib-2.0/gio/gunixcredentialsmessage.h +1 -1
- package/include/glib-2.0/gio/gunixfdlist.h +24 -12
- package/include/glib-2.0/gio/gunixsocketaddress.h +1 -1
- package/include/glib-2.0/gio/gvfs.h +1 -1
- package/include/glib-2.0/gio/gvolume.h +1 -1
- package/include/glib-2.0/gio/gvolumemonitor.h +1 -1
- package/include/glib-2.0/gio/gzlibcompressor.h +1 -1
- package/include/glib-2.0/gio/gzlibdecompressor.h +1 -1
- package/include/glib-2.0/glib/gdatetime.h +61 -0
- package/include/glib-2.0/glib/giochannel.h +34 -0
- package/include/glib-2.0/glib/gkeyfile.h +12 -0
- package/include/glib-2.0/glib/gmain.h +12 -0
- package/include/glib-2.0/glib/gmarkup.h +8 -2
- package/include/glib-2.0/glib/gmem.h +20 -20
- package/include/glib-2.0/glib/gquark.h +1 -1
- package/include/glib-2.0/glib/grefcount.h +5 -5
- package/include/glib-2.0/glib/gslice.h +5 -5
- package/include/glib-2.0/glib/gspawn.h +0 -6
- package/include/glib-2.0/glib/gstrfuncs.h +24 -24
- package/include/glib-2.0/glib/gstring.h +6 -4
- package/include/glib-2.0/glib/gtestutils.h +111 -76
- package/include/glib-2.0/glib/gtypes.h +56 -56
- package/include/glib-2.0/glib/gunicode.h +138 -24
- package/include/glib-2.0/glib/gutils.h +34 -0
- package/include/glib-2.0/gobject/gbinding.h +2 -2
- package/include/glib-2.0/gobject/gbindinggroup.h +1 -1
- package/include/glib-2.0/gobject/gboxed.h +2 -2
- package/include/glib-2.0/gobject/glib-enumtypes.h +4 -4
- package/include/glib-2.0/gobject/glib-types.h +37 -37
- package/include/glib-2.0/gobject/gobject.h +1 -1
- package/include/glib-2.0/gobject/gsignal.h +7 -1
- package/include/glib-2.0/gobject/gsignalgroup.h +1 -1
- package/include/glib-2.0/gobject/gtype.h +31 -25
- package/include/glib-2.0/gobject/gtypemodule.h +1 -1
- package/include/glib-2.0/gobject/gtypeplugin.h +1 -1
- package/include/glib-2.0/gobject/gvaluearray.h +1 -1
- package/include/glib-2.0/gobject/gvaluecollector.h +12 -12
- package/include/libheif/heif_image.h +7 -0
- package/include/libheif/heif_image_handle.h +16 -0
- package/include/libheif/heif_regions.h +5 -1
- package/include/libheif/heif_version.h +2 -2
- package/include/resvg.h +4 -3
- package/include/tiffvers.h +1 -1
- package/include/ultrahdr_api.h +20 -5
- package/include/vips/enumtypes.h +55 -55
- package/include/vips/version.h +4 -4
- package/lib/glib-2.0/include/glibconfig.h +1 -1
- package/lib/libaom.a +0 -0
- package/lib/libcgif.a +0 -0
- package/lib/libexif.a +0 -0
- package/lib/libexpat.a +0 -0
- package/lib/libexpat.la +1 -1
- package/lib/libffi.a +0 -0
- package/lib/libffi.la +3 -3
- package/lib/libgio-2.0.a +0 -0
- package/lib/libglib-2.0.a +0 -0
- package/lib/libgmodule-2.0.a +0 -0
- package/lib/libgobject-2.0.a +0 -0
- package/lib/libgthread-2.0.a +0 -0
- package/lib/libheif.a +0 -0
- package/lib/libhwy.a +0 -0
- package/lib/libimagequant.a +0 -0
- package/lib/libjpeg.a +0 -0
- package/lib/liblcms2.a +0 -0
- package/lib/libpng.a +0 -0
- package/lib/libpng16.a +0 -0
- package/lib/libresvg.a +0 -0
- package/lib/libsharpyuv.a +0 -0
- package/lib/libtiff.a +0 -0
- package/lib/libuhdr.a +0 -0
- package/lib/libvips-cpp.a +0 -0
- package/lib/libvips.a +0 -0
- package/lib/libwebp.a +0 -0
- package/lib/libwebpdecoder.a +0 -0
- package/lib/libwebpdemux.a +0 -0
- package/lib/libwebpmux.a +0 -0
- package/lib/libz.a +0 -0
- package/lib/pkgconfig/expat.pc +1 -1
- package/lib/pkgconfig/gio-2.0.pc +1 -1
- package/lib/pkgconfig/glib-2.0.pc +1 -1
- package/lib/pkgconfig/gmodule-2.0.pc +1 -1
- package/lib/pkgconfig/gmodule-export-2.0.pc +1 -1
- package/lib/pkgconfig/gmodule-no-export-2.0.pc +1 -1
- package/lib/pkgconfig/gobject-2.0.pc +1 -1
- package/lib/pkgconfig/gthread-2.0.pc +1 -1
- package/lib/pkgconfig/libffi.pc +1 -1
- package/lib/pkgconfig/libheif.pc +1 -1
- package/lib/pkgconfig/libuhdr.pc +1 -1
- package/lib/pkgconfig/vips-cpp.pc +1 -1
- package/lib/pkgconfig/vips.pc +1 -1
- package/package.json +1 -1
- package/versions.json +9 -9
|
@@ -44,96 +44,96 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
|
|
|
44
44
|
|
|
45
45
|
/* assertion API */
|
|
46
46
|
#define g_assert_cmpstr(s1, cmp, s2) G_STMT_START { \
|
|
47
|
-
const char *
|
|
48
|
-
if (g_strcmp0 (
|
|
47
|
+
const char *_s1 = (s1), *_s2 = (s2); \
|
|
48
|
+
if (g_strcmp0 (_s1, _s2) cmp 0) ; else \
|
|
49
49
|
g_assertion_message_cmpstr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
50
|
-
#s1 " " #cmp " " #s2,
|
|
50
|
+
#s1 " " #cmp " " #s2, _s1, #cmp, _s2); \
|
|
51
51
|
} G_STMT_END
|
|
52
52
|
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78
|
|
53
53
|
#define g_assert_cmpint(n1, cmp, n2) G_STMT_START { \
|
|
54
|
-
gint64
|
|
55
|
-
if (
|
|
54
|
+
gint64 _n1 = (n1), _n2 = (n2); \
|
|
55
|
+
if (_n1 cmp _n2) ; else \
|
|
56
56
|
g_assertion_message_cmpint (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
57
|
-
#n1 " " #cmp " " #n2, (guint64)
|
|
57
|
+
#n1 " " #cmp " " #n2, (guint64)_n1, #cmp, (guint64)_n2, 'i'); \
|
|
58
58
|
} G_STMT_END
|
|
59
59
|
#define g_assert_cmpuint(n1, cmp, n2) G_STMT_START { \
|
|
60
|
-
guint64
|
|
61
|
-
if (
|
|
60
|
+
guint64 _n1 = (n1), _n2 = (n2); \
|
|
61
|
+
if (_n1 cmp _n2) ; else \
|
|
62
62
|
g_assertion_message_cmpint (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
63
|
-
#n1 " " #cmp " " #n2,
|
|
63
|
+
#n1 " " #cmp " " #n2, _n1, #cmp, _n2, 'u'); \
|
|
64
64
|
} G_STMT_END
|
|
65
65
|
#define g_assert_cmphex(n1, cmp, n2) G_STMT_START { \
|
|
66
|
-
guint64
|
|
67
|
-
if (
|
|
66
|
+
guint64 _n1 = (n1), _n2 = (n2); \
|
|
67
|
+
if (_n1 cmp _n2) ; else \
|
|
68
68
|
g_assertion_message_cmpint (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
69
|
-
#n1 " " #cmp " " #n2,
|
|
69
|
+
#n1 " " #cmp " " #n2, _n1, #cmp, _n2, 'x'); \
|
|
70
70
|
} G_STMT_END
|
|
71
71
|
#else /* GLIB_VERSION_MIN_REQUIRED < GLIB_VERSION_2_78 */
|
|
72
72
|
#define g_assert_cmpint(n1, cmp, n2) G_STMT_START { \
|
|
73
|
-
gint64
|
|
74
|
-
if (
|
|
73
|
+
gint64 _n1 = (n1), _n2 = (n2); \
|
|
74
|
+
if (_n1 cmp _n2) ; else \
|
|
75
75
|
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
76
|
-
#n1 " " #cmp " " #n2, (long double)
|
|
76
|
+
#n1 " " #cmp " " #n2, (long double) _n1, #cmp, (long double) _n2, 'i'); \
|
|
77
77
|
} G_STMT_END
|
|
78
78
|
#define g_assert_cmpuint(n1, cmp, n2) G_STMT_START { \
|
|
79
|
-
guint64
|
|
80
|
-
if (
|
|
79
|
+
guint64 _n1 = (n1), _n2 = (n2); \
|
|
80
|
+
if (_n1 cmp _n2) ; else \
|
|
81
81
|
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
82
|
-
#n1 " " #cmp " " #n2, (long double)
|
|
82
|
+
#n1 " " #cmp " " #n2, (long double) _n1, #cmp, (long double) _n2, 'i'); \
|
|
83
83
|
} G_STMT_END
|
|
84
84
|
#define g_assert_cmphex(n1, cmp, n2) G_STMT_START {\
|
|
85
|
-
guint64
|
|
86
|
-
if (
|
|
85
|
+
guint64 _n1 = (n1), _n2 = (n2); \
|
|
86
|
+
if (_n1 cmp _n2) ; else \
|
|
87
87
|
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
88
|
-
#n1 " " #cmp " " #n2, (long double)
|
|
88
|
+
#n1 " " #cmp " " #n2, (long double) _n1, #cmp, (long double) _n2, 'x'); \
|
|
89
89
|
} G_STMT_END
|
|
90
90
|
#endif /* GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 */
|
|
91
91
|
#define g_assert_cmpfloat(n1,cmp,n2) G_STMT_START { \
|
|
92
|
-
long double
|
|
93
|
-
if (
|
|
92
|
+
long double _n1 = (long double) (n1), _n2 = (long double) (n2); \
|
|
93
|
+
if (_n1 cmp _n2) ; else \
|
|
94
94
|
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
95
|
-
#n1 " " #cmp " " #n2, (long double)
|
|
95
|
+
#n1 " " #cmp " " #n2, (long double) _n1, #cmp, (long double) _n2, 'f'); \
|
|
96
96
|
} G_STMT_END
|
|
97
97
|
#define g_assert_cmpfloat_with_epsilon(n1,n2,epsilon) \
|
|
98
98
|
G_STMT_START { \
|
|
99
|
-
double
|
|
100
|
-
if (G_APPROX_VALUE (
|
|
99
|
+
double _n1 = (n1), _n2 = (n2), _epsilon = (epsilon); \
|
|
100
|
+
if (G_APPROX_VALUE (_n1, _n2, _epsilon)) ; else \
|
|
101
101
|
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
102
|
-
#n1 " == " #n2 " (+/- " #epsilon ")",
|
|
102
|
+
#n1 " == " #n2 " (+/- " #epsilon ")", _n1, "==", _n2, 'f'); \
|
|
103
103
|
} G_STMT_END
|
|
104
104
|
#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78
|
|
105
105
|
#define g_assert_cmpmem(m1, l1, m2, l2) G_STMT_START {\
|
|
106
|
-
gconstpointer
|
|
107
|
-
size_t
|
|
108
|
-
if (
|
|
106
|
+
gconstpointer _m1 = m1, _m2 = m2; \
|
|
107
|
+
size_t _l1 = (size_t) l1, _l2 = (size_t) l2; \
|
|
108
|
+
if (_l1 != 0 && _m1 == NULL) \
|
|
109
109
|
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
110
110
|
"assertion failed (" #l1 " == 0 || " #m1 " != NULL)"); \
|
|
111
|
-
else if (
|
|
111
|
+
else if (_l2 != 0 && _m2 == NULL) \
|
|
112
112
|
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
113
113
|
"assertion failed (" #l2 " == 0 || " #m2 " != NULL)"); \
|
|
114
|
-
else if (
|
|
114
|
+
else if (_l1 != _l2) \
|
|
115
115
|
g_assertion_message_cmpint (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
116
116
|
#l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", \
|
|
117
|
-
|
|
118
|
-
else if (
|
|
117
|
+
_l1, "==", _l2, 'u'); \
|
|
118
|
+
else if (_l1 != 0 && _m2 != NULL && memcmp (_m1, _m2, _l1) != 0) \
|
|
119
119
|
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
120
120
|
"assertion failed (" #m1 " == " #m2 ")"); \
|
|
121
121
|
} G_STMT_END
|
|
122
122
|
#else /* GLIB_VERSION_MIN_REQUIRED < GLIB_VERSION_2_78 */
|
|
123
123
|
#define g_assert_cmpmem(m1, l1, m2, l2) G_STMT_START {\
|
|
124
|
-
gconstpointer
|
|
125
|
-
size_t
|
|
126
|
-
if (
|
|
124
|
+
gconstpointer _m1 = m1, _m2 = m2; \
|
|
125
|
+
size_t _l1 = (size_t) l1, _l2 = (size_t) l2; \
|
|
126
|
+
if (_l1 != 0 && _m1 == NULL) \
|
|
127
127
|
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
128
128
|
"assertion failed (" #l1 " == 0 || " #m1 " != NULL)"); \
|
|
129
|
-
else if (
|
|
129
|
+
else if (_l2 != 0 && _m2 == NULL) \
|
|
130
130
|
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
131
131
|
"assertion failed (" #l2 " == 0 || " #m2 " != NULL)"); \
|
|
132
|
-
else if (
|
|
132
|
+
else if (_l1 != _l2) \
|
|
133
133
|
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
134
134
|
#l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", \
|
|
135
|
-
(long double)
|
|
136
|
-
else if (
|
|
135
|
+
(long double) _l1, "==", (long double) _l2, 'i'); \
|
|
136
|
+
else if (_l1 != 0 && _m2 != NULL && memcmp (_m1, _m2, _l1) != 0) \
|
|
137
137
|
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
138
138
|
"assertion failed (" #m1 " == " #m2 ")"); \
|
|
139
139
|
} G_STMT_END
|
|
@@ -141,33 +141,33 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
|
|
|
141
141
|
#define g_assert_cmpvariant(v1, v2) \
|
|
142
142
|
G_STMT_START \
|
|
143
143
|
{ \
|
|
144
|
-
GVariant *
|
|
145
|
-
if (!g_variant_equal (
|
|
144
|
+
GVariant *_v1 = (v1), *_v2 = (v2); \
|
|
145
|
+
if (!g_variant_equal (_v1, _v2)) \
|
|
146
146
|
{ \
|
|
147
|
-
gchar *
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC,
|
|
152
|
-
g_free (
|
|
153
|
-
g_free (
|
|
154
|
-
g_free (
|
|
147
|
+
gchar *_s1, *_s2, *_msg; \
|
|
148
|
+
_s1 = g_variant_print (_v1, TRUE); \
|
|
149
|
+
_s2 = g_variant_print (_v2, TRUE); \
|
|
150
|
+
_msg = g_strdup_printf ("assertion failed (" #v1 " == " #v2 "): %s does not equal %s", _s1, _s2); \
|
|
151
|
+
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, _msg); \
|
|
152
|
+
g_free (_s1); \
|
|
153
|
+
g_free (_s2); \
|
|
154
|
+
g_free (_msg); \
|
|
155
155
|
} \
|
|
156
156
|
} \
|
|
157
157
|
G_STMT_END
|
|
158
158
|
#define g_assert_cmpstrv(strv1, strv2) \
|
|
159
159
|
G_STMT_START \
|
|
160
160
|
{ \
|
|
161
|
-
const char * const *
|
|
162
|
-
const char * const *
|
|
163
|
-
if (!
|
|
161
|
+
const char * const *_strv1 = (const char * const *) (strv1); \
|
|
162
|
+
const char * const *_strv2 = (const char * const *) (strv2); \
|
|
163
|
+
if (!_strv1 || !_strv2) \
|
|
164
164
|
{ \
|
|
165
|
-
if (
|
|
165
|
+
if (_strv1) \
|
|
166
166
|
{ \
|
|
167
167
|
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
168
168
|
"assertion failed (" #strv1 " == " #strv2 "): " #strv2 " is NULL, but " #strv1 " is not"); \
|
|
169
169
|
} \
|
|
170
|
-
else if (
|
|
170
|
+
else if (_strv2) \
|
|
171
171
|
{ \
|
|
172
172
|
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
173
173
|
"assertion failed (" #strv1 " == " #strv2 "): " #strv1 " is NULL, but " #strv2 " is not"); \
|
|
@@ -175,25 +175,25 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
|
|
|
175
175
|
} \
|
|
176
176
|
else \
|
|
177
177
|
{ \
|
|
178
|
-
guint
|
|
179
|
-
guint
|
|
180
|
-
if (
|
|
178
|
+
guint _l1 = g_strv_length ((char **) _strv1); \
|
|
179
|
+
guint _l2 = g_strv_length ((char **) _strv2); \
|
|
180
|
+
if (_l1 != _l2) \
|
|
181
181
|
{ \
|
|
182
|
-
char *
|
|
183
|
-
|
|
184
|
-
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC,
|
|
185
|
-
g_free (
|
|
182
|
+
char *_msg; \
|
|
183
|
+
_msg = g_strdup_printf ("assertion failed (" #strv1 " == " #strv2 "): length %u does not equal length %u", _l1, _l2); \
|
|
184
|
+
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, _msg); \
|
|
185
|
+
g_free (_msg); \
|
|
186
186
|
} \
|
|
187
187
|
else \
|
|
188
188
|
{ \
|
|
189
|
-
guint
|
|
190
|
-
for (
|
|
189
|
+
guint _i; \
|
|
190
|
+
for (_i = 0; _i < _l1; _i++) \
|
|
191
191
|
{ \
|
|
192
|
-
if (g_strcmp0 (
|
|
192
|
+
if (g_strcmp0 (_strv1[_i], _strv2[_i]) != 0) \
|
|
193
193
|
{ \
|
|
194
194
|
g_assertion_message_cmpstrv (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
|
|
195
195
|
#strv1 " == " #strv2, \
|
|
196
|
-
|
|
196
|
+
_strv1, _strv2, _i); \
|
|
197
197
|
} \
|
|
198
198
|
} \
|
|
199
199
|
} \
|
|
@@ -201,16 +201,16 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
|
|
|
201
201
|
} \
|
|
202
202
|
G_STMT_END
|
|
203
203
|
#define g_assert_no_errno(expr) G_STMT_START { \
|
|
204
|
-
int
|
|
204
|
+
int _ret, _errsv; \
|
|
205
205
|
errno = 0; \
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
if (
|
|
206
|
+
_ret = expr; \
|
|
207
|
+
_errsv = errno; \
|
|
208
|
+
if (_ret < 0) \
|
|
209
209
|
{ \
|
|
210
|
-
gchar *
|
|
211
|
-
|
|
212
|
-
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC,
|
|
213
|
-
g_free (
|
|
210
|
+
gchar *_msg; \
|
|
211
|
+
_msg = g_strdup_printf ("assertion failed (" #expr " >= 0): errno %i: %s", _errsv, g_strerror (_errsv)); \
|
|
212
|
+
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, _msg); \
|
|
213
|
+
g_free (_msg); \
|
|
214
214
|
} \
|
|
215
215
|
} G_STMT_END \
|
|
216
216
|
GLIB_AVAILABLE_MACRO_IN_2_66
|
|
@@ -500,7 +500,6 @@ void g_test_queue_destroy (GDestroyNotify destroy_func,
|
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
502
|
* GTestTrapFlags:
|
|
503
|
-
* @G_TEST_TRAP_DEFAULT: Default behaviour. Since: 2.74
|
|
504
503
|
* @G_TEST_TRAP_SILENCE_STDOUT: Redirect stdout of the test child to
|
|
505
504
|
* `/dev/null` so it cannot be observed on the console during test
|
|
506
505
|
* runs. The actual output is still captured though to allow later
|
|
@@ -522,6 +521,13 @@ void g_test_queue_destroy (GDestroyNotify destroy_func,
|
|
|
522
521
|
* [flags@GLib.TestSubprocessFlags].
|
|
523
522
|
*/
|
|
524
523
|
typedef enum {
|
|
524
|
+
/**
|
|
525
|
+
* G_TEST_TRAP_DEFAULT:
|
|
526
|
+
*
|
|
527
|
+
* Default behaviour.
|
|
528
|
+
*
|
|
529
|
+
* Since: 2.74
|
|
530
|
+
* */
|
|
525
531
|
G_TEST_TRAP_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
|
|
526
532
|
G_TEST_TRAP_SILENCE_STDOUT = 1 << 7,
|
|
527
533
|
G_TEST_TRAP_SILENCE_STDERR = 1 << 8,
|
|
@@ -536,7 +542,36 @@ gboolean g_test_trap_fork (guint64 usec_timeout,
|
|
|
536
542
|
|
|
537
543
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
538
544
|
|
|
545
|
+
/**
|
|
546
|
+
* GTestSubprocessFlags:
|
|
547
|
+
* @G_TEST_SUBPROCESS_INHERIT_STDIN: If this flag is given, the child
|
|
548
|
+
* process will inherit the parent's stdin. Otherwise, the child's
|
|
549
|
+
* stdin is redirected to `/dev/null`.
|
|
550
|
+
* @G_TEST_SUBPROCESS_INHERIT_STDOUT: If this flag is given, the child
|
|
551
|
+
* process will inherit the parent's stdout. Otherwise, the child's
|
|
552
|
+
* stdout will not be visible, but it will be captured to allow
|
|
553
|
+
* later tests with [func@GLib.test_trap_assert_stdout].
|
|
554
|
+
* @G_TEST_SUBPROCESS_INHERIT_STDERR: If this flag is given, the child
|
|
555
|
+
* process will inherit the parent's stderr. Otherwise, the child's
|
|
556
|
+
* stderr will not be visible, but it will be captured to allow
|
|
557
|
+
* later tests with [func@GLib.test_trap_assert_stderr].
|
|
558
|
+
* @G_TEST_SUBPROCESS_INHERIT_DESCRIPTORS: If this flag is given, the
|
|
559
|
+
* child process will inherit the parent’s open file descriptors.
|
|
560
|
+
*
|
|
561
|
+
* Flags to pass to [func@GLib.test_trap_subprocess] to control input and output.
|
|
562
|
+
*
|
|
563
|
+
* Note that in contrast with [func@GLib.test_trap_fork], the default
|
|
564
|
+
* behavior of [func@GLib.test_trap_subprocess] is to not show stdout
|
|
565
|
+
* and stderr.
|
|
566
|
+
*/
|
|
539
567
|
typedef enum {
|
|
568
|
+
/**
|
|
569
|
+
* G_TEST_SUBPROCESS_DEFAULT:
|
|
570
|
+
*
|
|
571
|
+
* Default behaviour.
|
|
572
|
+
*
|
|
573
|
+
* Since: 2.74
|
|
574
|
+
*/
|
|
540
575
|
G_TEST_SUBPROCESS_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
|
|
541
576
|
G_TEST_SUBPROCESS_INHERIT_STDIN = 1 << 0,
|
|
542
577
|
G_TEST_SUBPROCESS_INHERIT_STDOUT = 1 << 1,
|
|
@@ -255,56 +255,56 @@ typedef const gchar * (*GTranslateFunc) (const gchar *str,
|
|
|
255
255
|
# if defined (__i386__)
|
|
256
256
|
# define GUINT16_SWAP_LE_BE_IA32(val) \
|
|
257
257
|
(G_GNUC_EXTENSION \
|
|
258
|
-
({ guint16
|
|
259
|
-
if (__builtin_constant_p (
|
|
260
|
-
|
|
258
|
+
({ guint16 _v, _x = ((guint16) (val)); \
|
|
259
|
+
if (__builtin_constant_p (_x)) \
|
|
260
|
+
_v = GUINT16_SWAP_LE_BE_CONSTANT (_x); \
|
|
261
261
|
else \
|
|
262
262
|
__asm__ ("rorw $8, %w0" \
|
|
263
|
-
: "=r" (
|
|
264
|
-
: "0" (
|
|
263
|
+
: "=r" (_v) \
|
|
264
|
+
: "0" (_x) \
|
|
265
265
|
: "cc"); \
|
|
266
|
-
|
|
266
|
+
_v; }))
|
|
267
267
|
# if !defined (__i486__) && !defined (__i586__) \
|
|
268
268
|
&& !defined (__pentium__) && !defined (__i686__) \
|
|
269
269
|
&& !defined (__pentiumpro__) && !defined (__pentium4__)
|
|
270
270
|
# define GUINT32_SWAP_LE_BE_IA32(val) \
|
|
271
271
|
(G_GNUC_EXTENSION \
|
|
272
|
-
({ guint32
|
|
273
|
-
if (__builtin_constant_p (
|
|
274
|
-
|
|
272
|
+
({ guint32 _v, _x = ((guint32) (val)); \
|
|
273
|
+
if (__builtin_constant_p (_x)) \
|
|
274
|
+
_v = GUINT32_SWAP_LE_BE_CONSTANT (_x); \
|
|
275
275
|
else \
|
|
276
276
|
__asm__ ("rorw $8, %w0\n\t" \
|
|
277
277
|
"rorl $16, %0\n\t" \
|
|
278
278
|
"rorw $8, %w0" \
|
|
279
|
-
: "=r" (
|
|
280
|
-
: "0" (
|
|
279
|
+
: "=r" (_v) \
|
|
280
|
+
: "0" (_x) \
|
|
281
281
|
: "cc"); \
|
|
282
|
-
|
|
282
|
+
_v; }))
|
|
283
283
|
# else /* 486 and higher has bswap */
|
|
284
284
|
# define GUINT32_SWAP_LE_BE_IA32(val) \
|
|
285
285
|
(G_GNUC_EXTENSION \
|
|
286
|
-
({ guint32
|
|
287
|
-
if (__builtin_constant_p (
|
|
288
|
-
|
|
286
|
+
({ guint32 _v, _x = ((guint32) (val)); \
|
|
287
|
+
if (__builtin_constant_p (_x)) \
|
|
288
|
+
_v = GUINT32_SWAP_LE_BE_CONSTANT (_x); \
|
|
289
289
|
else \
|
|
290
290
|
__asm__ ("bswap %0" \
|
|
291
|
-
: "=r" (
|
|
292
|
-
: "0" (
|
|
293
|
-
|
|
291
|
+
: "=r" (_v) \
|
|
292
|
+
: "0" (_x)); \
|
|
293
|
+
_v; }))
|
|
294
294
|
# endif /* processor specific 32-bit stuff */
|
|
295
295
|
# define GUINT64_SWAP_LE_BE_IA32(val) \
|
|
296
296
|
(G_GNUC_EXTENSION \
|
|
297
|
-
({ union { guint64
|
|
298
|
-
guint32
|
|
299
|
-
|
|
300
|
-
if (__builtin_constant_p (
|
|
301
|
-
|
|
297
|
+
({ union { guint64 _ll; \
|
|
298
|
+
guint32 _l[2]; } _w, _r; \
|
|
299
|
+
_w._ll = ((guint64) (val)); \
|
|
300
|
+
if (__builtin_constant_p (_w._ll)) \
|
|
301
|
+
_r._ll = GUINT64_SWAP_LE_BE_CONSTANT (_w._ll); \
|
|
302
302
|
else \
|
|
303
303
|
{ \
|
|
304
|
-
|
|
305
|
-
|
|
304
|
+
_r._l[0] = GUINT32_SWAP_LE_BE (_w._l[1]); \
|
|
305
|
+
_r._l[1] = GUINT32_SWAP_LE_BE (_w._l[0]); \
|
|
306
306
|
} \
|
|
307
|
-
|
|
307
|
+
_r._ll; }))
|
|
308
308
|
/* Possibly just use the constant version and let gcc figure it out? */
|
|
309
309
|
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
|
|
310
310
|
# ifndef GUINT32_SWAP_LE_BE
|
|
@@ -316,36 +316,36 @@ typedef const gchar * (*GTranslateFunc) (const gchar *str,
|
|
|
316
316
|
# elif defined (__ia64__)
|
|
317
317
|
# define GUINT16_SWAP_LE_BE_IA64(val) \
|
|
318
318
|
(G_GNUC_EXTENSION \
|
|
319
|
-
({ guint16
|
|
320
|
-
if (__builtin_constant_p (
|
|
321
|
-
|
|
319
|
+
({ guint16 _v, _x = ((guint16) (val)); \
|
|
320
|
+
if (__builtin_constant_p (_x)) \
|
|
321
|
+
_v = GUINT16_SWAP_LE_BE_CONSTANT (_x); \
|
|
322
322
|
else \
|
|
323
323
|
__asm__ __volatile__ ("shl %0 = %1, 48 ;;" \
|
|
324
324
|
"mux1 %0 = %0, @rev ;;" \
|
|
325
|
-
: "=r" (
|
|
326
|
-
: "r" (
|
|
327
|
-
|
|
325
|
+
: "=r" (_v) \
|
|
326
|
+
: "r" (_x)); \
|
|
327
|
+
_v; }))
|
|
328
328
|
# define GUINT32_SWAP_LE_BE_IA64(val) \
|
|
329
329
|
(G_GNUC_EXTENSION \
|
|
330
|
-
({ guint32
|
|
331
|
-
if (__builtin_constant_p (
|
|
332
|
-
|
|
330
|
+
({ guint32 _v, _x = ((guint32) (val)); \
|
|
331
|
+
if (__builtin_constant_p (_x)) \
|
|
332
|
+
_v = GUINT32_SWAP_LE_BE_CONSTANT (_x); \
|
|
333
333
|
else \
|
|
334
334
|
__asm__ __volatile__ ("shl %0 = %1, 32 ;;" \
|
|
335
335
|
"mux1 %0 = %0, @rev ;;" \
|
|
336
|
-
: "=r" (
|
|
337
|
-
: "r" (
|
|
338
|
-
|
|
336
|
+
: "=r" (_v) \
|
|
337
|
+
: "r" (_x)); \
|
|
338
|
+
_v; }))
|
|
339
339
|
# define GUINT64_SWAP_LE_BE_IA64(val) \
|
|
340
340
|
(G_GNUC_EXTENSION \
|
|
341
|
-
({ guint64
|
|
342
|
-
if (__builtin_constant_p (
|
|
343
|
-
|
|
341
|
+
({ guint64 _v, _x = ((guint64) (val)); \
|
|
342
|
+
if (__builtin_constant_p (_x)) \
|
|
343
|
+
_v = GUINT64_SWAP_LE_BE_CONSTANT (_x); \
|
|
344
344
|
else \
|
|
345
345
|
__asm__ __volatile__ ("mux1 %0 = %1, @rev ;;" \
|
|
346
|
-
: "=r" (
|
|
347
|
-
: "r" (
|
|
348
|
-
|
|
346
|
+
: "=r" (_v) \
|
|
347
|
+
: "r" (_x)); \
|
|
348
|
+
_v; }))
|
|
349
349
|
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA64 (val))
|
|
350
350
|
# ifndef GUINT32_SWAP_LE_BE
|
|
351
351
|
# define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_IA64 (val))
|
|
@@ -356,24 +356,24 @@ typedef const gchar * (*GTranslateFunc) (const gchar *str,
|
|
|
356
356
|
# elif defined (__x86_64__)
|
|
357
357
|
# define GUINT32_SWAP_LE_BE_X86_64(val) \
|
|
358
358
|
(G_GNUC_EXTENSION \
|
|
359
|
-
({ guint32
|
|
360
|
-
if (__builtin_constant_p (
|
|
361
|
-
|
|
359
|
+
({ guint32 _v, _x = ((guint32) (val)); \
|
|
360
|
+
if (__builtin_constant_p (_x)) \
|
|
361
|
+
_v = GUINT32_SWAP_LE_BE_CONSTANT (_x); \
|
|
362
362
|
else \
|
|
363
363
|
__asm__ ("bswapl %0" \
|
|
364
|
-
: "=r" (
|
|
365
|
-
: "0" (
|
|
366
|
-
|
|
364
|
+
: "=r" (_v) \
|
|
365
|
+
: "0" (_x)); \
|
|
366
|
+
_v; }))
|
|
367
367
|
# define GUINT64_SWAP_LE_BE_X86_64(val) \
|
|
368
368
|
(G_GNUC_EXTENSION \
|
|
369
|
-
({ guint64
|
|
370
|
-
if (__builtin_constant_p (
|
|
371
|
-
|
|
369
|
+
({ guint64 _v, _x = ((guint64) (val)); \
|
|
370
|
+
if (__builtin_constant_p (_x)) \
|
|
371
|
+
_v = GUINT64_SWAP_LE_BE_CONSTANT (_x); \
|
|
372
372
|
else \
|
|
373
373
|
__asm__ ("bswapq %0" \
|
|
374
|
-
: "=r" (
|
|
375
|
-
: "0" (
|
|
376
|
-
|
|
374
|
+
: "=r" (_v) \
|
|
375
|
+
: "0" (_x)); \
|
|
376
|
+
_v; }))
|
|
377
377
|
/* gcc seems to figure out optimal code for this on its own */
|
|
378
378
|
# define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val))
|
|
379
379
|
# ifndef GUINT32_SWAP_LE_BE
|