Commit Graph

21984 Commits

Author SHA1 Message Date
Philip Withnall
8bb04fb866 glib.supp: More reachable suppressions for threads and thread pools
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2132
2020-06-17 11:46:27 +01:00
Philip Withnall
f18f7c9a21 glib.supp: Tweak reachable allocation suppressions
Suppress the cached charset from `g_get_charset()`, and widen the
suppression of the global random number `GRand` instance, since it can
be used outside test cases.

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

Fixes: #2134
2020-06-17 11:26:13 +01:00
Philip Withnall
40ff2a5718 Merge branch 'fix-gnulib-msvc-isnan' into 'master'
meson: Fix gnulib build where isnan*() is needed

See merge request GNOME/glib!1524
2020-06-17 10:15:37 +00:00
Sebastian Dröge
ff7d5b36e7 Merge branch 'variant-get-string-docs' into 'master'
gvariant: Fix documentation for g_variant_get_string() to match reality

See merge request GNOME/glib!1531
2020-06-17 07:45:22 +00:00
Sebastian Dröge
bd7d7ccdf5 Merge branch '1398-getdateformatw-error-handling' into 'master'
gdate: Add some missing error handling to GetDateFormatW() calls

Closes #1398

See merge request GNOME/glib!1529
2020-06-17 06:57:23 +00:00
Philip Withnall
a2e215663c Merge branch 'fix-spelling' into 'master'
win32: spelling fix

See merge request GNOME/glib!1532
2020-06-15 20:56:40 +00:00
Marc-André Lureau
f9be7d2bb5 win32: spelling fix
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-06-15 20:33:16 +04:00
Chun-wei Fan
9b59c79e98 meson: Fix gnulib build where isnan*() is needed
We need to include the isnan*.c sources as necessary, if any of the
isnan*() functions cannot be found, so that builds on compilers that
lack these functions could be fixed.

Also, if we do have the isnan*() functions, improve the build by not
unnecessarily including the isnan*.c sources in the build.

If the isnan*() functions are found, make sure that the
HAVE_ISNAN*_IN_LIBC macros are defined in the CFLags, so that we do not
accidently require the gnulib implementations for these functions.
2020-06-14 23:59:37 +08:00
Philip Withnall
1519962792 gvariant: Fix documentation for g_variant_get_string() to match reality
The implementation didn’t match the documentation. The implementation
has the right behaviour (wrt not allowing embedded nuls, validating
UTF-8, and returning a default value if an invalid string is detected),
so keep that and fix the documentation to match.

The [`GVariant`
specification](https://people.gnome.org/~desrt/gvariant-serialisation.pdf)
is incorrect on this point, and the implementation of GLib was
purposefully changed after the specification was published (but before
`GVariant` became API-stable in GLib). The behaviour in GLib
(specifically concerning all strings being in UTF-8) is consistent with
D-Bus.

Spotted by William Manley.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-06-12 18:06:14 +01:00
Philip Withnall
1cd7d1ade2 Merge branch 'codespell' into 'master'
tree: Fix various typos and outdated terminology

See merge request GNOME/glib!1530
2020-06-12 16:18:40 +00:00
Philip Withnall
00bfb3ab44 tree: Fix various typos and outdated terminology
This was mostly machine generated with the following command:
```
codespell \
    --builtin clear,rare,usage \
    --skip './po/*' --skip './.git/*' --skip './NEWS*' \
    --write-changes .
```
using the latest git version of `codespell` as per [these
instructions](https://github.com/codespell-project/codespell#user-content-updating).

Then I manually checked each change using `git add -p`, made a few
manual fixups and dropped a load of incorrect changes.

There are still some outdated or loaded terms used in GLib, mostly to do
with git branch terminology. They will need to be changed later as part
of a wider migration of git terminology.

If I’ve missed anything, please file an issue!

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-06-12 15:01:08 +01:00
Philip Withnall
a00320599c gdate: Add some missing error handling to GetDateFormatW() calls
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1398
2020-06-12 11:55:49 +01:00
Kukuh Syafaat
c6ccff0ef4 Update Indonesian translation 2020-06-12 08:25:43 +00:00
Philip Withnall
d8b8cad5a1 Merge branch 'mcatanzaro/peer-certificate' into 'master'
gtlsconnection: Improve documentation of peer-certificate[-errors]

See merge request GNOME/glib!1528
2020-06-11 11:32:26 +00:00
Michael Catanzaro
4db1336ff6 gtlsconnection: Improve documentation of peer-certificate[-errors]
In glib-networking#127, it was reported that we don't properly implement
the documented behavior of these properties. However, we cannot fix it
because libsoup relies on the implemented behavior, and it's hard to
change that without cascading breakage. The practical solution is to
adjust our documentation to match reality. There should be no downsides
to this, and compat risk of changing the documentation is much smaller
than risk of changing the implementation, so I think this is the best we
can make of an unfortunate situation. See glib-networking#127 for full
discussion and glib-networking#129 for the regression when we attempted
to match the documented behavior.
2020-06-10 09:56:47 -05:00
Sebastian Dröge
d918b6bcd1 Merge branch '2106-dead-code' into 'master'
gtranslit: Drop duplicate if case

Closes #2106

See merge request GNOME/glib!1490
2020-06-10 13:00:05 +00:00
sicklylife
374804c19b Update Japanese translation 2020-06-10 12:34:28 +00:00
sicklylife
98b89b739a Update Japanese translation 2020-06-10 12:18:46 +00:00
Philip Withnall
b202604389 Merge branch 'wip/smcv/normalize-trailing-newlines' into 'master'
Normalize C source files to end with exactly one newline

See merge request GNOME/glib!1525
2020-06-10 09:19:55 +00:00
Simon McVittie
44c004c84e Normalize C source files to end with exactly one newline
Some editors automatically remove trailing blank lines, or
automatically add a trailing newline to avoid having a trailing
non-blank line that is not terminated by a newline. To avoid unrelated
whitespace changes when users of such editors contribute to GLib,
let's pre-emptively normalize all files.

Unlike more intrusive whitespace normalization like removing trailing
whitespace from each line, this seems unlikely to cause significant
issues with cherry-picking changes to stable branches.

Implemented by:

    find . -name '*.[ch]' -print0 | \
    xargs -0 perl -0777 -p -i -e 's/\n+\z//g; s/\z/\n/g'

Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-06-10 09:48:02 +01:00
Philip Withnall
a50ad8b10e Merge branch 'meson-fix-gnulib-printf-checks' into 'master'
meson: Fix gnulib printf checks

See merge request GNOME/glib!1522
2020-06-08 14:14:53 +00:00
Nirbheek Chauhan
6c76089ccc meson: Fix gnulib printf checks
Some typos, and accidental usage of the strings `'true'` / `'false'`
instead of the booleans `true` / `false`.
2020-06-08 18:45:33 +05:30
Philip Withnall
625f1b4007 Merge branch 'Android-stpcpy' into 'master'
meson: check for stpcpy using cc.links()

See merge request GNOME/glib!1515
2020-06-08 11:29:24 +00:00
Vilius Sutkus 89
fcfb1c6b9e meson: Require 0.54.2 when building for Android ≤ 20
cc.has_function() provide false positive for Android-20 and earlier; the fix is in Meson 0.54.2. People attempting to cross-compile previously wouldn’t have been able to get it to work without manual intervention, so the dependency bump for this platform is not an additional obstacle for them.
2020-06-08 11:29:24 +00:00
Philip Withnall
633413909d Merge branch 'docs' into 'master'
docs: Add (nullable) annotations

Closes #2124

See merge request GNOME/glib!1521
2020-06-05 14:05:12 +00:00
Avinash Sonawane
e91f4ac961 docs: Add (nullable) annotations 2020-06-05 18:40:37 +05:30
Philip Withnall
016c39d883 Merge branch 'win32reg-assertions' into 'master'
GWin32RegistryKey: Move assertions

See merge request GNOME/glib!1517
2020-06-05 11:26:22 +00:00
Руслан Ижбулатов
8651bee90f GWin32RegistryKey: Move assertions
While these assertions look right at the first glance,
they actually crash the program. That's because GObject
insists on initializing all construct-only properties
to their default values, which results in
g_win32_registry_key_set_property() being called multiple
times with NULL string, once for each unset property.

If "path" is actually set by the caller, a subsequent
call to set "path-utf16" to NULL will fail an assertion,
since absolute_path is already non-NULL.

With assertions moved the set-to-NULL calls bail out before
an assertion is made.
2020-06-05 10:31:25 +00:00
Sebastian Dröge
c573e21191 Merge branch 'wip/baedert/arrays' into 'master'
strfuncs: Use a GPtrArray in strsplit()

See merge request GNOME/glib!1518
2020-06-05 07:31:34 +00:00
Matej Urbančič
201d9cbd76 Updated Slovenian translation 2020-06-05 09:13:17 +02:00
Timm Bäder
a2e715a4fe strfuncs: Use a GPtrArray in strsplit()
This is more efficient and also much easier since we already have the
memory allocated that we're going to return from the function. No need
to do that ourselves or reverse a list.
2020-06-05 08:59:15 +02:00
Philip Withnall
c93318953e Merge branch 'threaded-socket-service-nullable-source-object' into 'master'
gthreadedsocketservice: Mark source_object of run signal as nullable

See merge request GNOME/glib!1516
2020-06-02 11:54:23 +00:00
Sebastian Dröge
2ed356cb67 Merge branch 'disable-ios-nsgetenviron' into 'master'
Various fixes when building for iOS

See merge request GNOME/glib!1512
2020-06-02 10:56:44 +00:00
Sebastian Dröge
4556bf1e24 gthreadedsocketservice: Mark source_object of run signal as nullable 2020-06-02 13:40:54 +03:00
Philip Withnall
3fd3a246f6 Merge branch 'bookmark-visited' into 'master'
Initialize the visited time of a new GBookmarkFile

See merge request GNOME/glib!1513
2020-05-30 18:03:08 +00:00
Emmanuele Bassi
9f7f2b4d55 Add a GBookmarkFile serialization test case
We're roundtripping from a valid file, but we should also roundtrip from
a newly created GBookmarkFile, to ensure that we set all the necessary
fields.
2020-05-30 17:40:52 +01:00
Emmanuele Bassi
909a8856ef Initialize the visited time of a new GBookmarkFile
Just like we do for the other fields. Otherwise, when we serialise the
item, we're going to hit a segmentation fault when trying to format a
NULL GDateTime.
2020-05-30 17:09:40 +01:00
Nirbheek Chauhan
ab6b764e24 ci: growing_stack should be true for android and ios
We can't run this test when cross-compiling, but we know what this
should be on Android and iOS.
2020-05-29 02:44:44 +05:30
Nirbheek Chauhan
e3ef2cdf82 .gitlab-ci: Add an example iOS cross file
This should be generated based on the available SDK versions and the
iPhone version you want to target, but that's something we can do
when adding macOS and iOS CI.
2020-05-29 01:17:14 +05:30
Nirbheek Chauhan
a28b52d7db meson: Only look for _NSGetEnviron when building for macOS
On iOS it can cause build failures with some SDK versions, and its
usage will also cause the app to be rejected on submission.
2020-05-29 00:31:35 +05:30
Nirbheek Chauhan
3c78d0cec6 meson: Autodetect when building for iOS
Instead of relying on `system` to be set correctly in the
cross-compile file, detect when we're building for iOS/watchOS/tvOS.
2020-05-29 00:31:35 +05:30
Nirbheek Chauhan
c6af3c7749 meson: host_system can be ios when cross-compiling
Cross-compile system names aren't standardized in Meson yet[1], but we
already use this name in `tests/meson.build`, so use it here too for
consistency.

1. https://mesonbuild.com/Reference-tables.html#operating-system-names
2020-05-29 00:31:35 +05:30
Emmanuele Bassi
3d0e1f5c85 Merge branch '1931-bookmark-file-y2038' into 'master'
Resolve "GBookmarkFile API involves time_t"

Closes #1931

See merge request GNOME/glib!1511
2020-05-28 15:41:04 +00:00
Philip Withnall
c45ad011f4 tests: Add tests for deprecated GBookmarkFile API
Just to check that it correctly wraps the new replacement APIs.

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

Helps: #1931
2020-05-28 14:55:53 +01:00
Philip Withnall
6147cae1c6 gbookmarkfile: Deprecate GBookmarkFile APIs which use time_t
They use the `time_t` type, which is not year 2038 safe on 32-bit
systems, so have to be deprecated.

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

Fixes: #1931
2020-05-28 14:55:53 +01:00
Philip Withnall
9b82fd021a tests: Update GBookmarkFile tests to use new APIs
In preparation for deprecating the old APIs. This shouldn’t functionally
affect the tests.

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

Helps: #1931
2020-05-28 14:55:53 +01:00
Philip Withnall
fbc1456971 gbookmarkfile: Add Y2038-proof APIs to GBookmarkFile
These are alternatives to the existing `time_t`-based APIs, which will
soon be deprecated due to `time_t` only being Y2038-safe on 64-bit
systems.

The new APIs take a GDateTime instead.

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

Helps: #1931
2020-05-28 14:55:53 +01:00
Nirbheek Chauhan
caec84ae1e Merge branch 'gdbus-codegen-exporting' into 'master'
Make symbols generated by gdbus-codegen exportable on Visual Studio-style builds

See merge request GNOME/glib!1452
2020-05-28 13:01:46 +00:00
Chun-wei Fan
cd229a2fb4 docs: Document --symbol-decorator for gdbus-codegen
This updates gdbus-codegen.xml to include documentation for the
--symbol-decorator, --symbol-decorator-header and
--symbol-decorator-define options, which is used to help to export
symbols in the generated code.
2020-05-28 18:24:57 +08:00
Nirbheek Chauhan
73d9b72fec Merge branch 'fix-gresource-export-msvc' into 'master'
glib-compile-resources: Fix exporting on Visual Studio

Closes #1215

See merge request GNOME/glib!1468
2020-05-28 10:03:28 +00:00