Commit Graph

19583 Commits

Author SHA1 Message Date
Emmanuele Bassi
1ddcdbb8ec Merge branch 'g_file_info_set_attribute_stringv' into 'master'
gfileinfo: Fix annotation for g_file_info_set_attribute_stringv

See merge request GNOME/glib!591
2019-01-17 12:01:27 +00:00
Tomasz Miąsko
6994be01f4 gfileinfo: Fix annotation for g_file_info_set_attribute_stringv
Annotate `attr_value` parameter of `g_file_info_set_attribute_stringv`
as zero-terminated array, since it isn't currently recognized as such.
2019-01-17 12:43:07 +01:00
Philip Withnall
c9f883b221 Merge branch 'resource-overlay-info' into 'master'
gresource: Complete the overlay support

Closes #1445

See merge request GNOME/glib!497
2019-01-17 10:13:52 +00:00
Philip Withnall
58f7a4d1b1 Merge branch 'msvc-dirent' into 'master'
MSVC: Move dirent implementation to glib/dirent/

See merge request GNOME/glib!588
2019-01-17 09:36:57 +00:00
Xavier Claessens
ec93d9e125 MSVC: Move dirent implementation to glib/dirent/ 2019-01-16 10:24:11 -05:00
Michael Catanzaro
193cc66919 Merge branch 'mcatanzaro/g_assert_cpp' into 'master'
Add separate definitions of g_assert_[non]null() for C++

See merge request GNOME/glib!568
2019-01-15 22:11:39 +00:00
Michael Catanzaro
4a0ce6b458 Add separate definitions of g_assert_[non]null() for C++
In C++ we can use nullptr to ensure g_assert_[non]null() is only called
with pointers. This will introduce build failures in tests that would
have previously compiled, but only in C++, and only for code that
misused these macros. Code using the macros properly will be fine.

This change caught a couple bugs in WebKit's API tests, where I had
accidentally used these functions improperly. E.g. this is now a build
failure in C++:

g_assert_null(webkit_context_menu_get_n_items(menu)); /* Oops! */

Either I wanted to use cmpuint there, or I wanted to use
webkit_context_menu_get_items() to receive a GList* instead.

Another example that will no longer build in C++:

g_assert_null(0); /* Contrived, but 0 is not a pointer! */
2019-01-15 15:57:44 -06:00
Philip Withnall
6a372bf703 Merge branch 'disable-tests' into 'master'
Temporarily disable flaky tests

See merge request GNOME/glib!579
2019-01-15 16:45:15 +00:00
Philip Withnall
419e1485a5 Merge branch 'so-long-autotools' into 'master'
Drop autotools support

See merge request GNOME/glib!580
2019-01-15 15:26:26 +00:00
Philip Withnall
d2062f0a65 docs: Drop pointless leading whitespace
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
b3efef5b6f build: Drop autotools support
So long, and thanks for everything. We’re a Meson-only shop now.

glib-2-58 will remain the last stable GLib release series which is
buildable using autotools.

We continue to install autoconf macros for autotools-using projects
which depend on GLib; they are stable API.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
ac396b4dc1 docs: Drop outdated timestamp and sign-off line
See the git history for that instead.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
855aea45c6 docs: Update debugging docs to mention Meson build options
The behaviour of the Meson build has changed a little vs what we did in
autotools. In autotools, --enable-debug was a tristate (yes, no,
undefined), with all three options resulting in different macro
definitions.

In Meson, we have a bistate of --buildtype={debug,debugoptimized} vs
--buildtype=(anything else). There is no way to automatically define
G_DISABLE_ASSERT or G_DISABLE_CHECKS while building GLib — you need to
define them in your CPPFLAGS in your environment instead.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
7cff1b2265 glib: Update various code comments to mention Meson
Rather than referring to the old autotools build system.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
d08e4661de docs: Update DocBook ‘build’ documentation to mention Meson
Drop mentions of autotools. In particular, update the list of configure
options to reflect what’s available in the Meson build.

Further work is needed as a follow-up to improve our handling of (what
was formerly) the --enable-debug option.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
64bd539d15 docs: Drop outdated cross-building documentation from README.win32
It is very very outdated and irrelevant now.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
aaac7a166f docs: Update HACKING and README to mention Meson rather than autotools
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
c8797d7a42 ci: Drop autotools CI build
We’re about to drop autotools support entirely in master.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
e58e68f932 glib: Link to glib-tap.mk and friends from glib-2-58 branch
We’re about to drop autotools support. Rather than keep the .mk files
around in master indefinitely, link to the versions in the glib-2-58
branch (the last stable release of GLib which supports building with
autotools) in readiness for dropping the .mk files from master.

Any future fixes to these files can happen on the glib-2-58 branch. The
links should work forever (as long as we use GitLab).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
41a8f74ff8 docs: Update INSTALL.in to mention Meson rather than autotools
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
9ea050b131 glib: Port glib-mirroring-tab subdirectory to Meson
We don’t actually build this; the Makefile was just there to allow
ad-hoc regeneration of the glib-mirroring-tab output files.

Port it to Meson just so there are no remnants of GNU make left in GLib.
Don’t hook it up to the rest of the build.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
74099b4045 Merge branch 'document-why-no-msvc-noreturn' into 'master'
gmacros: MSVC supports the noreturn function attribute

See merge request GNOME/glib!583
2019-01-15 14:46:29 +00:00
Nirbheek Chauhan
2a76dba03e gmacros: MSVC supports the noreturn function attribute
But it can't be used as a drop-in implementation of G_GNUC_NORETURN
because it can only be placed at the start of the function prototype.

Document this in a comment so that the next person doesn't spend
20 min figuring it out.
2019-01-15 01:56:29 +05:30
Daniel Mustieles
5751189fb8 Updated Spanish translation 2019-01-14 15:25:16 +01:00
Anders Jonsson
ff3e781bce Update Swedish translation 2019-01-14 13:17:09 +00:00
Matthias Clasen
37eb1e6645 Add a test for resource overlays
Add a test that checks that g_resources_get_info()
respects the G_RESOURCE_OVERLAYS environment variable.
2019-01-10 13:50:26 -05:00
Matthias Clasen
68bcb8f048 gresource: Complete the overlay support
Unlike the other g_resources_ functions, g_resources_get_info
was not respecting G_RESOURCE_OVERLAYS. Add this missing
support.

Closes: #1445
2019-01-10 12:31:09 -05:00
Matthias Clasen
3aa8b4eba7 Merge branch '1625-nbsp-docs-followup-to-548' into 'master'
gutils: Mention NBSP in g_format_size() documentation

Closes #1625

See merge request GNOME/glib!581
2019-01-10 15:01:34 +00:00
Philip Withnall
76af5dabb4 Merge branch '1625-unbreakable-space-needed-when-showing-size-of-folder-file' into 'master'
Resolve "Unbreakable space needed when showing size of folder/file"

Closes #1625

See merge request GNOME/glib!548
2019-01-10 11:27:04 +00:00
Philip Withnall
f1729119b4 gutils: Mention NBSP in g_format_size() documentation
This is a follow-up to
https://gitlab.gnome.org/GNOME/glib/merge_requests/548.

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

Closes #1625
2019-01-10 11:25:36 +00:00
Philip Withnall
956a54d6d6 tests: Tag several rogue GIO tests as ‘flaky’
These have been flaky for a while now, and nobody has found the time to
fix them properly. They’ve been disrupting development for altogether
far too long.

They need investigating in the following issues, fixing properly, and
the ‘flaky’ tag removing from each one:
 • https://gitlab.gnome.org/GNOME/glib/issues/1644https://gitlab.gnome.org/GNOME/glib/issues/1634https://gitlab.gnome.org/GNOME/glib/issues/1614https://gitlab.gnome.org/GNOME/glib/issues/1515

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-09 10:48:42 +00:00
Philip Withnall
7058efb390 ci: Don’t run tests tagged as ‘flaky’ on the CI machines
This effectively renders those tests useless (since realistically nobody
runs tests locally), but it’s better than every other CI run failing for
unrelated reasons. The idea is that the ‘flaky’ tag can be temporarily
applied to a test while a problem is being investigated or fixed, and
then removed later.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-09 10:47:24 +00:00
Michael Catanzaro
8109eaae5d Merge branch 'wip/mjog/accept-certificate-docs' into 'master'
gio: Update bad cert error in accept-certificate and GTlsError docs

See merge request GNOME/glib!575
2019-01-08 18:29:20 +00:00
Philip Withnall
0d3fe5c350 Merge branch 'queue-clear' into 'master'
Add g_queue_clear_full API

Closes #1464

See merge request GNOME/glib!537
2019-01-08 16:01:09 +00:00
Daniel Mustieles
615f8b60cf Updated Spanish translation 2019-01-08 16:02:40 +01:00
Michael Gratton
d7aedeff29 gio: Update bad cert error in accept-certificate and GTlsError docs
This makes the documented error returned when the cert is rejected
consistent with both self and reality.
2019-01-08 22:40:54 +11:00
Philip Withnall
b8c6ff424a Merge branch 'private-set-alloc0' into 'master'
gthread: Add g_private_set_alloc0() convenience API

See merge request GNOME/glib!516
2019-01-07 19:35:23 +00:00
Philip Withnall
140c2a225a glib.supp: Add a suppression for GMainContext default stacks
Since this uses a private GQueue, we can’t suppress this by using
g_private_set_alloc0().

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-07 18:54:17 +00:00
Philip Withnall
f6caeb6d1a gthread: Add g_private_set_alloc0() internal convenience API
This is a wrapper around g_private_set() which allocates the desired
amount of memory for the caller and calls g_private_set() on it.

This is intended to make it easier to suppress Valgrind warnings about
leaked memory, since g_private_set() is typically used to make one-time
per-thread allocations. We can now just add a blanket suppression rule
for any allocations inside g_private_set_alloc0().

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-07 18:54:17 +00:00
Philip Withnall
990da71e85 Merge branch 'gboolean-docs' into 'master'
docs: Add note on how to check a gboolean condition

See merge request GNOME/glib!571
2019-01-07 16:23:49 +00:00
Alistair Thomas
94d855fc6d docs: Add note on how to check a gboolean condition 2019-01-07 15:19:41 +00:00
Emmanuele Bassi
4f5f34689f Merge branch 'interface-docs' into 'master'
gtype: Clarify type of GInterfaceInitFunc

See merge request GNOME/glib!512
2019-01-07 14:40:44 +00:00
Philip Withnall
74e4b8396f Merge branch 'bad-liststore' into 'master'
Fix overflow in GListStore

Closes #1639

See merge request GNOME/glib!572
2019-01-07 14:09:59 +00:00
Matthias Clasen
d8a0dcb11e list store: Fix overflow issues
Check for over- and underflow when manipulating positions.

This makes the sequence
  g_list_model_get_item (store, 0);
  g_list_model_get_item (store, -1u);
return NULL for the second call, as it should.

Closes: #1639
2019-01-07 08:53:16 -05:00
Matthias Clasen
471153fb20 liststore: Add a test demonstrating overflow issues
Calling
  g_list_model_get_item (store, 0);
  g_list_model_get_item (store, -1u);
does not return NULL for the second call, as it should.

This was showing up in GTK+ list model tests.
2019-01-07 08:52:47 -05:00
Philip Withnall
eeb657bb0f Merge branch '1637-win32-uninitialised-variable' into 'master'
gwin32appinfo: Fix a potential free of an uninitialised variable

Closes #1637

See merge request GNOME/glib!573
2019-01-07 11:04:22 +00:00
Philip Withnall
29e8f5795d gwin32appinfo: Fix a potential free of an uninitialised variable
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1637
2019-01-07 10:25:46 +00:00
Rico Tzschichholz
245279e834 Merge branch '1636-gtask-getters' into 'master'
gtask: Ensure to return 1 or 0 from getters rather than truthy ints

Closes #1636

See merge request GNOME/glib!570
2019-01-05 09:08:22 +00:00
Philip Withnall
8dced725c2 Merge branch 'annotation-fix' into 'master'
goption: Fix an annotation on g_option_context_parse_strv()

See merge request GNOME/glib!545
2019-01-05 07:57:17 +00:00
Philip Withnall
ae381d795e gtask: Ensure to return 1 or 0 from getters rather than truthy ints
Since commit 290bb0dd, where various members of GTask were converted to
a bitfield, some of the getters:
 • g_task_get_check_cancellable()
 • g_task_get_return_on_cancel()
 • g_task_get_completed()
have been returning truthy ints (zero or an arbitrary non-zero integer)
as boolean values, rather than the canonical boolean ints of 1 and 0.

This broke the `yield` statement in Vala, whose generated C code
compares `g_task_get_completed (…) != TRUE`. i.e. Whether the
`completed` field has a value not equal to 1.

Fix this by explicitly converting truthy ints to canonical boolean ints
in all getters.

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

https://gitlab.gnome.org/GNOME/glib/issues/1636
2019-01-05 07:51:14 +00:00