Commit Graph

20884 Commits

Author SHA1 Message Date
Дилян Палаузов
74583affe0 Add (out) annotation to (optional) parameters
… as the parameters are not (inout).

Closes #1837
2019-07-23 11:41:42 +00:00
Emmanuele Bassi
ab544aa8c0 docs: Remove mentions of mailing lists
And drop FTP from the list of places where to find release archives.
This is not 1998.
2019-07-23 11:27:30 +01:00
Emmanuele Bassi
4d73e1f014 Use GitLab to reserve a new fundamental type slot
Even though you *really* shouldn't do that at all.
2019-07-23 11:27:30 +01:00
Emmanuele Bassi
bcf208ba4c Bugs should be reported on GitLab
Not on mailing lists that do not exist any more.
2019-07-23 11:27:30 +01:00
Emmanuele Bassi
6a207c329f doap: Update the <mailing-list> element 2019-07-23 11:27:30 +01:00
Emmanuele Bassi
dd42b8f01f docs: Remove mentions of mailing lists
We use a tag on Discourse, now.
2019-07-23 11:27:30 +01:00
Emmanuele Bassi
11715d17db docs: The mailing lists are no more
Don't send people to mailing lists that do not exist any more. We moved
to Discourse.
2019-07-23 11:05:17 +01:00
Rafael Fontenelle
8c5a14adf3 Update Brazilian Portuguese translation 2019-07-22 03:28:50 +00:00
Emmanuele Bassi
204c6255e4 Merge branch 'fix_G_DECLARE_DERIVABLE_TYPE_documentation' into 'master'
Fix typo in G_DECLARE_DERIVABLE_TYPE documentation

Closes #1838

See merge request GNOME/glib!1000
2019-07-20 14:38:43 +00:00
Emmanuel Fleury
79da3551e3 Fix typo in G_DECLARE_DERIVABLE_TYPE documentation
Closes issue #1838
2019-07-20 16:05:12 +02:00
Philip Withnall
249299a76f Merge branch 'doc-fixes' into 'master'
Various doc fixes

See merge request GNOME/glib!982
2019-07-17 10:58:21 +00:00
Philip Withnall
fa4423d435 Merge branch 'clang-cl-support' into 'master'
Experimental clang-cl support

See merge request GNOME/glib!979
2019-07-17 10:30:28 +00:00
Philip Withnall
81b1ff8300 Merge branch 'atomic' into 'master'
fix atomic detection on older gcc versions

See merge request GNOME/glib!991
2019-07-17 10:22:00 +00:00
Stefan Sauer
77cc96ae88 Update the instructions in .gitlab-ci.
These where a copied, but not adapted. This is similar to a change in the
gtkdoc module.
2019-07-16 21:12:24 -07:00
Philip Withnall
f6666f5e09 Merge branch 'dbus-address-transfer-annotation' into 'master'
gdbusaddress: Add missing transfer annotation

See merge request GNOME/glib!997
2019-07-16 21:07:20 +00:00
Matthew Leeds
0c495f3dbf gdbusaddress: Add missing transfer annotation 2019-07-16 13:43:20 -07:00
Emmanuele Bassi
298c6adf32 Merge branch 'docs-examples' into 'master'
docs: Add example to g_test_summary() documentation

See merge request GNOME/glib!992
2019-07-16 13:51:41 +00:00
Philip Withnall
c0f13f3cc8 garray: Fix binary search for non-existent elements on the left
If searching for an element which is smaller than every element in the
array (i.e. the element being searched for is not in the array), the
previous g_array_binary_search() implementation would underflow in the
calculation `right = middle - 1`, and end up trying to dereference an
element way off the right of the array.

Fix that by checking the additions/subtractions before doing them, and
bailing if the bounds are hit. We don’t need to check `middle <
G_MAXUINT`, as `middle` is bounded above by `right`, which is always `<=
_array->len - 1`, and `_array->len <= G_MAXUINT`.

Add some tests for that, and for not-present elements in the middle of
the array. Previously, the tests only checked for not-present elements
which were bigger than every element in the array.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-16 12:14:53 +01:00
Philip Withnall
ec61daf503 garray: Rewrite binary search calculation to avoid integer overflow
If `right` and `left` are both near `G_MAXUINT`, it’s possible for the
addition to overflow, even if the eventual result would fit in a
`guint`. Avoid that by operating on the difference instead.

The difference is guaranteed to be positive due to the prior `left <=
right` check.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-16 11:35:18 +01:00
Philip Withnall
bc0fcddc18 tests: Use g_ptr_array_set_free_func() rather than manual free()
We don’t need to free array elements manually.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-16 10:17:20 +01:00
Philip Withnall
121b6bc599 tests: Add missing array length checks
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-16 10:17:08 +01:00
Philip Withnall
625055f60e tests: Fix array length calculations in array tests
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-16 10:16:41 +01:00
Philip Withnall
b4943aa360 gptrarray: Correctly set copied array length in g_ptr_array_copy()
The allocation size was set correctly before, but not the array length,
so the copied array appeared to have zero elements.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-16 10:15:57 +01:00
Philip Withnall
1ac8d50331 gptrarray: Set free func on copied array in g_ptr_array_copy()
Otherwise its elements (which have just all been copied) will leak.

Spotted by Xavier Claessens in
https://gitlab.gnome.org/GNOME/glib/merge_requests/918#note_555867.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-16 10:15:09 +01:00
Emmanuel Fleury
6a1512ed65 Allow guid key in dbus addresses
Original patch from William Hua

Fix issue #1018
2019-07-16 10:34:42 +02:00
Nirbheek Chauhan
d076c4c688 Merge branch 'gio-docs-fixes' into 'master'
gio: Fix minor docs mistakes

See merge request GNOME/glib!994
2019-07-15 23:39:18 +00:00
Matthew Leeds
ce9ea30b1d gio: Fix minor docs mistakes 2019-07-15 16:07:18 -07:00
Philip Withnall
2ac44f3111 Merge branch 'key-file-no-file' into 'master'
key file: Handle filename being NULL

Closes #1825

See merge request GNOME/glib!984
2019-07-15 12:50:45 +00:00
Philip Withnall
493b8ca021 Merge branch 'keyfile-portal-fixes' into 'master'
Keyfile portal fixes

See merge request GNOME/glib!985
2019-07-15 12:32:01 +00:00
Matthias Clasen
addb8c158a settings: Tweak priorities for keyfile backend
We want to use the keyfile backend in sandboxes,
but we want to avoid people losing their existing
settings that are stored in dconf. Flatpak does
a migration from dconf to keyfile, but only if
the app explictly requests it.

From an app perspective, there are two steps to
the dconf->keyfile migration:
1. Request that flatpak do the migration, by adding
   the migrate-path key to the metadata
2. Stop adding the 'dconf hole' to the sandbox

To keep us from switching to the keyfile backend
prematurely, look at whether the app has stopped
requesting a 'dconf hole' in the sandbox.
2019-07-15 13:01:56 +01:00
Matthias Clasen
9c5d3a6081 portal: Add a getter for dconf access
Add method to find whether the sandbox provides
access to dconf. This will be used to tweak
the priorities for the keyfile settings backend.
2019-07-15 13:01:56 +01:00
Philip Withnall
003b6dacbb Merge branch 'fix-static-test-3' into 'master'
Fix test failures for static builds (Reworked again)

Closes #1648

See merge request GNOME/glib!989
2019-07-15 11:01:04 +00:00
DDoSolitary
2718245dc2 Fix test failures for static builds
The plugin modules in these tests get statically linked with a separate
copy of GLib so they end up calling vfuncs in their own copy of GLib.

Fixes #1648
2019-07-15 11:01:04 +00:00
Philip Withnall
4b087717a0 docs: Add example to g_test_summary() documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-07-15 11:07:38 +01:00
Philip Withnall
618d3e4a0a Merge branch 'issue-943' into 'master'
Improve the documentation for G_DEFINE_TYPE_WITH_PRIVATE

Closes #943

See merge request GNOME/glib!990
2019-07-15 08:53:52 +00:00
Christoph Reiter
b6566ad92e Merge branch 'slow-tests' into 'master'
build: Increase the slow test timeout to 180s

See merge request GNOME/glib!934
2019-07-14 21:15:53 +00:00
Antoine Jacoutot
a76cb94308 fix atomic detection on older gcc versions
GLib checks for __sync_bool_compare_and_swap, and requires
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 to be defined if the function is available,
except with special cases like Linux armv5.
Extend the existing workaround to unbreak on old gcc versions that implement
__sync_bool_compare_and_swap but don't provide __GCC_HAVE_* macros.
2019-07-14 19:25:28 +02:00
Emmanuele Bassi
87016536a6 Improve the documentation for G_DEFINE_TYPE_WITH_PRIVATE
Connect the dots between G_ADD_PRIVATE and the various G_DEFINE_* macros
that use it, as well as expanding the code example for
G_DEFINE_TYPE_EXTENDED with a private instance data declaration.

Closes: #943
2019-07-14 17:50:35 +01:00
Emmanuele Bassi
d56bdeb926 Merge branch 'nirbheek/remove-outdated-libtool-stuff' into 'master'
gio/tests: Remove code and comments referring to libtool

See merge request GNOME/glib!987
2019-07-13 11:13:56 +00:00
Nirbheek Chauhan
5e7f12b0ce gio/tests: Remove code and comments referring to libtool 2019-07-13 12:23:07 +05:30
Philip Withnall
88b9e71c9c Merge branch 'fixing_gio_manpage_typo' into 'master'
Fixing a small typo in docs/references/gio/gio.xml

Closes #1828

See merge request GNOME/glib!986
2019-07-12 16:12:15 +00:00
Emmanuel Fleury
628e448e02 Fixing a small typo in docs/references/gio/gio.xml
Fix issue #1828
2019-07-12 17:49:51 +02:00
Riccardo Bortolato
2b1a9219f1 windows: fix multicast socket binding to specific network interfaces
v7, based on a patch by mrgard (GNOME/glib#1635)
make w32_adapter_ipv4_addr() C90-compliant
check for ERROR_BUFFER_OVERFLOW when calling GetAdaptersAddresses()
code-style fixes
indentation fixes
use g_try_(re)alloc and g_free
style suggestions by pwithnall
drop uni_count variable
cap maximum allowed interface name string length according to windows documentation

Fixes: #1635
2019-07-12 15:21:53 +02:00
Chun-wei Fan
e8d471f3e1 meson: Mostly assume clang-cl is MSVC
We need to enable building the dirent and gnulib sources for clang-cl,
as we are still using the Microsoft-style headers and lib's and CRT.
We need to also do this for the following, for similar reasoning:

-Symbol export (via __declspec(dllexport))
-Dependency discovery without pkg-config files
-long long and ssize_t detection

We do, however, enable the autoptr tests for clang-cl builds.  Note that
at this point real MSVC builds are still better supported than clang-cl
builds, and it will likely remain so for at least the near future,
alhtough real MSVC builds of the GTK stack are consumable and are usable
by clang-cl.
2019-07-11 15:38:21 +08:00
Matthias Clasen
953f23f13c key file: Handle filename being NULL
This happens when we are default-constructed
without explicit arguments.

Closes: https://gitlab.gnome.org/GNOME/glib/issues/1825
2019-07-10 11:14:03 -04:00
Xavier Claessens
61872d60b5 doc: Add gobject 2.62 API 2019-07-10 10:29:04 -04:00
Xavier Claessens
8381ce472f doc: Hide some internal function 2019-07-10 10:29:04 -04:00
Xavier Claessens
e528577202 doc: Add missing GNativeSocketAddress 2019-07-10 10:29:04 -04:00
Xavier Claessens
255f64cad8 doc: Split API reference per platform
We can only include win32 APIs when building for Windows because gtkdoc
needs to compile the GObject classes for introspection.
2019-07-10 10:29:04 -04:00
Philip Withnall
b80c17e325 Merge branch 'patch-1' into 'master'
gio: fix typo in g_settings_reset documentation

See merge request GNOME/glib!981
2019-07-10 14:22:36 +00:00