Commit Graph

20525 Commits

Author SHA1 Message Date
Emmanuel Fleury
46f70e9901 Adding a function g_array_copy() to glib/garray.c
Original code from Simon van der Linden

Close issue #236
2019-06-27 13:40:26 +02:00
Philip Withnall
75614a0972 Merge branch 'improve_g_ptr_array_api' into 'master'
Adding g_ptr_array_copy() and g_ptr_array_extend() to garray API

Closes #269

See merge request GNOME/glib!918
2019-06-27 11:11:41 +00:00
Emmanuel Fleury
0675703af0 Adding g_ptr_array_extend_and_steal() function to glib/garray.c 2019-06-27 12:28:32 +02:00
Philip Withnall
7b5d1c8b06 Merge branch 'nirbheek/static-assert-c11' into 'master'
gmacros: Use _Static_assert when C11 is available

See merge request GNOME/glib!955
2019-06-27 10:20:46 +00:00
Philip Withnall
ad4a2cc345 Merge branch 'manichaean-typo' into 'master'
Fix the ISO 15924 code for Manichaean

See merge request GNOME/glib!954
2019-06-27 10:13:31 +00:00
Nirbheek Chauhan
5d14764a6b gmacros: Use _Static_assert when C11 is available
The static assert message is much nicer to read, and is less likely to
be misinterpreted as a false positive.

glib is built with `-std=gnu89`, but this macro will be available to
projects that use glib with c11 or gnu11.
2019-06-27 14:18:43 +05:30
David Corbett
2fdc35aabd Fix the ISO 15924 code for Manichaean 2019-06-26 21:31:22 -04:00
Nirbheek Chauhan
be56d90fe9 gmodule: Add support for loading UWP packaged DLLs
LoadLibrary() is not available when building for the Universal Windows
Platform, which is used for shipping apps to the Windows Store on all
devices (Windows Desktop, Windows Phone, Surface, XBox, etc).

Apps are not allowed to load arbitrary DLLs from the system. The only
DLLs they can load are those that are bundled with the app as assets.
LoadPackagedLibrary() can be used to access those assets by filename.

The function is meant to be a drop-in replacement for LoadLibrary(),
and the HANDLE returned can be treated the same as before.
2019-06-26 22:59:19 +05:30
Emmanuel Fleury
43ad244df2 Adding g_ptr_array_extend() function to glib/garray.c
Related to issue #269
2019-06-26 15:35:28 +02:00
Emmanuel Fleury
86bcc5c942 Adding g_ptr_array_copy() function to glib/garray.c
Related to issue #269
2019-06-26 15:34:47 +02:00
Philip Withnall
6a291b3e84 Merge branch 'gvalue_avoid_expensive_checks' into 'master'
gvalue: Avoid expensive checks where possible

Closes #894

See merge request GNOME/glib!946
2019-06-26 11:11:22 +00:00
Philip Withnall
40f868c189 Merge branch 'wip/lantw/enable-ci-on-freebsd-12' into 'master'
ci: Enable CI on FreeBSD 12

See merge request GNOME/glib!950
2019-06-26 11:08:44 +00:00
Philip Withnall
b555a7bfdd Merge branch 'minor-docs-improvements' into 'master'
gio: Make minor docs improvements

See merge request GNOME/glib!952
2019-06-26 11:05:05 +00:00
Matthew Leeds
1f49c5aaeb gio: Make minor docs improvements
This commit changes a comment in _g_dbus_worker_do_read_cb() to be
slightly more useful. At least in my experience debugging an
intermittent unit test failure in another project, this failure
condition occurred because although g_test_dbus_down() ensures that the
session GDBusConnection has exit-on-close set to FALSE before killing
its dbus-daemon, there was still a GDBusConnection on the system bus
which hit this failed read code path, because we had
DBUS_SYSTEM_BUS_ADDRESS set to the address of the #GTestDBus daemon, to
appease libudisks.

Also, make a few other minor improvements to the docs.
2019-06-25 11:11:33 -07:00
Nirbheek Chauhan
cdc2a798cf uwp: workaround a false positive in certification of glib
It seems that the Windows App Certification Kit searches all files and
binaries for the regex '\<reg\>' (or something like it) and throws
errors if it exists. Supposedly this is for preventing apps from
running REG.EXE

https://blogs.msdn.microsoft.com/appconsult/2017/08/16/how-to-validate-if-your-application-is-compliant-with-the-windows-store-polices-windows-10-and-windows-10-s/
2019-06-25 13:09:04 +05:30
Emmanuel Fleury
cf29e37c54 Moving GCopyFunc typedef from glib/gnode.h to glib/gtypes.h 2019-06-25 09:19:49 +02:00
Emmanuel Fleury
5f3e470eb3 gvalue: Avoid expensive checks where possible
Original patch submitted by Edward Hervey

Close issue #894
2019-06-25 09:19:11 +02:00
Philip Withnall
c411d0aa6d Merge branch 'fix-mkenums-genmarshal-test-windows' into 'master'
GObject: Fix mkenums.py and genmarshal.py tests on Windows

See merge request GNOME/glib!948
2019-06-24 16:47:30 +00:00
Ting-Wei Lan
4bf3cb0e54 ci: Enable CI on FreeBSD 12 2019-06-25 00:46:52 +08:00
Philip Withnall
bc4d9d7126 Merge branch 'fix-gobject-signals-test-windows' into 'master'
gobject/tests/signals.c: Fix tests on Windows

See merge request GNOME/glib!947
2019-06-24 16:39:44 +00:00
Philip Withnall
aef72f4356 Merge branch 'wip/lantw/dont-limit-host-name-to-99-bytes' into 'master'
gutils: Don't limit the length of the host name to 99

See merge request GNOME/glib!944
2019-06-24 16:18:59 +00:00
Chun-wei Fan
75e3f92cd0 GObject: Fix mkenums.py and genmarshal.py tests on Windows
The two test scripts actually assumed some *NIX paradigms, so we need
to adapt them so that they can work on Windows as well, the changes are
namely:

-Call the glib-mkenums and glib-genmarshal Python scripts with the
 Python interpreter, not just relying on shebang lines, on Windows.
 This is because the native Windows console (cmd.exe) does not support
 shebang lines, for subprocess.run().

-Use NamedTemporaryFile with delete=False, otherwise Windows cannot find
 the temp files we need when running the tests.

-Use universal_newlines=True for subprocess.run() so that we do not need
 to worry out line ending differences on different systems.

-Make sure we are not in the temp directories we create, where the tests
 are being run, upon cleanup.  Windows does not like deleting
 directories that we are currently in.
2019-06-25 00:04:48 +08:00
Chun-wei Fan
108a8d842f gobject/tests/mkenums.py: Fix _write_rspfile()
The 'return f.name' should be in the same level as the body of
'with tempfile.NamedTemporaryFile(...) as f:'
2019-06-25 00:03:09 +08:00
Chun-wei Fan
e1e1e8ee1c gobject/tests/signals.c: Fix tests on Windows
On Windows and possibly other platforms the '%p' printf modifier does
not prefix printed values with '0x', so do not expect the warning
message to contain the '0x' prefix for the handler pointer value.
2019-06-25 00:01:02 +08:00
Ting-Wei Lan
446ba28d31 gutils: Don't limit the length of the host name to 99
It is unclear that why the size of the buffer was chosen to be 100
because the commit introduced the code didn't mention the reason.
POSIX defines _POSIX_HOST_NAME_MAX to be 255 and provides a way to
determine the suitable value with sysconf, so we should use it instead
of hard-coding a small value.
2019-06-24 23:41:40 +08:00
Philip Withnall
bd5922db09 Merge branch 'fix-stack-overrun' into 'master'
Avoid overrunning stack at the end of the varargs.

See merge request GNOME/glib!945
2019-06-24 13:27:33 +00:00
Chun-wei Fan
dbea8d5449 Fix module tests on Visual Studio builds
On Visual Studio, Meson builds modules as xxxx.dll, not libxxxx.dll when
xxxx is specified as the name for the shared_module() build directive.

This means that in the test programs if we expect for libxxxx for the
module name, the test will fail as there is no libxxxx.dll but there is
xxxx.dll.  This makes the test program look for the module files
correctly.
2019-06-24 10:58:58 +08:00
Chun-wei Fan
edc5eb98c2 gio/tests/resourceplugin.c: Ensure entry points are exported
Ensure that the entry points/symbols are exported on Visual Studio
builds as well.
2019-06-24 10:58:51 +08:00
John Ralls
633e9e0bcb Avoid overrunning stack at the end of the varargs. 2019-06-21 16:18:40 -07:00
Philip Withnall
84d0af4226 Merge branch '1811-unicode-annotations' into 'master'
gunidecomp: Add (out) annotations to g_unichar_{de,}compose()

Closes #1811

See merge request GNOME/glib!936
2019-06-21 17:02:58 +00:00
Philip Withnall
9d668a6a86 Merge branch '872-ucs-annotations' into 'master'
Add missing (transfer) annotations to gutf8.c functions

Closes #872

See merge request GNOME/glib!938
2019-06-21 17:01:11 +00:00
Philip Withnall
68feec9ce9 Merge branch 'listmodel-docs' into 'master'
list model: Expand items-changed docs

See merge request GNOME/glib!941
2019-06-21 16:55:15 +00:00
Matthias Clasen
99764fd8fa list model: Expand items-changed docs
Point out explicitly that positions change
when ::items-changed is emitted.
2019-06-21 15:53:51 +00:00
Jeremy Tan
0fda1d46cb gstdio: simplify _g_win32_get_mode_alias
Do an in-place update on the wide-character mode string
2019-06-21 21:17:43 +10:00
Jeremy Tan
04dcee1814 gstdio: Ensure w32_err_to_errno is used everywhere, add ERROR_INVALID_PARAMETER handling
case switches in w32_err_to_errno have been alphabetically sorted.

The only addition is the ERROR_INVALID_PARAMETER->EINVAL case.
2019-06-21 21:17:29 +10:00
Philip Withnall
1bd72404ba Merge branch 'master' into 'master'
Add g_timer_is_active

Closes #1794

See merge request GNOME/glib!929
2019-06-21 10:22:42 +00:00
Tristan Partin
b9988e5fc9 Add g_timer_is_active
Helper function for exposing the internal state of a GTimer.
2019-06-21 10:22:41 +00:00
Philip Withnall
8f6e5f1b01 gutf8: Add various missing (transfer) annotations
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #872
2019-06-21 11:05:11 +01:00
Philip Withnall
5380f417dc gunidecomp: Fix a (nullable) annotation which should be (optional)
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #872
2019-06-21 11:04:35 +01:00
Philip Withnall
92cd91cee6 Merge branch 'ignore_pycache_directories' into 'master'
Ignore */__pycache__/* directories

See merge request GNOME/glib!935
2019-06-21 09:37:55 +00:00
Emmanuel Fleury
9dab582f9c Prevent taptestrunner to create a __pycache__ directory 2019-06-21 09:13:11 +02:00
Philip Withnall
79502febe0 gunidecomp: Add (out) annotations to g_unichar_{de,}compose()
The `(out)` and (unusually) `(not optional)` annotations were missing.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1811
2019-06-20 23:33:58 +01:00
Philip Withnall
a60376594d build: Increase the slow test timeout to 180s
We are still seeing occasional CI failures due to timeouts when heavily
loaded. It’s best to wait a little longer than to throw all the results
out when they’re almost done.

For example, see https://gitlab.gnome.org/tristan957/glib/-/jobs/331330.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-06-20 08:41:39 +01:00
Philip Withnall
5c5920d968 Merge branch 'fix-fileutils-test-windows' into 'master'
glib/tests/fileutils.c: Fix stdio Wrapper Test on Windows

See merge request GNOME/glib!931
2019-06-19 08:44:39 +00:00
Philip Withnall
213b41e5a4 Merge branch 'fix-convert-tests-windows' into 'master'
glib/tests/convert.c: Skip tests that aren't meaningful for Windows

See merge request GNOME/glib!930
2019-06-19 08:42:30 +00:00
Chun-wei Fan
7a72d3bbae glib/tests/fileutils.c: Fix stdio Wrapper Test on Windows
The g_creat() call was done in *nix style in regards to the mode parameter,
which the Windows CRT isn't going to understand (nor like, on newer CRTs).

Update the program such that it will pass, by using Windows-style
permission mode parameters for g_creat(), on Windows.
2019-06-19 11:21:20 +08:00
Chun-wei Fan
6e224f7677 glib/tests/convert.c: Skip tests that aren't meaningful for Windows
On Windows, everything is assumed as UTF-8 in g_get_filename_charsets(),
so setting G_FILENAME_ENCODING envvar has no effect, so we can just skip
the test on g_get_filename_charsets() where we try to influence it by
setting the G_FILENAME_ENCODING envvar.
2019-06-19 10:55:17 +08:00
Daniel Mustieles
5393f34b8e Updated Spanish translation 2019-06-18 14:52:18 +02:00
Philip Withnall
f8bad07319 Merge branch 'gdbusproxy_prefixes_unstripped_error' into 'master'
gdbus: proxy : Strip remote error on activation failure

Closes #804

See merge request GNOME/glib!925
2019-06-18 10:30:37 +00:00
Philip Withnall
1888deecfc Merge branch 'glib.fixtools.i18n' into 'master'
Tools: Correctly show translated messages on more recent Visual Studio builds

Closes #1169

See merge request GNOME/glib!895
2019-06-18 10:18:31 +00:00