Commit Graph

25253 Commits

Author SHA1 Message Date
Emmanuel Fleury
87a4cea9e4 Convert g_printf() to g_test_message() to capture messages on TAP 2022-05-12 17:25:07 +02:00
Emmanuel Fleury
4589ff080d Move test/gio-test.c to glib/test/io-channel-basic.c
Helps issue #1434
2022-05-12 17:25:07 +02:00
Emmanuel Fleury
38e0781ba7 Convert deprecated GTimeVal to GDateTime in tests/gio-test.c 2022-05-12 17:25:05 +02:00
Emmanuel Fleury
dbe8e52bde Convert tests/gio-test.c to g_test framework 2022-05-12 17:20:46 +02:00
Philip Withnall
da2702646c Merge branch 'format-codegen' into 'main'
Replace single quotes in gio/tests/codegen.py

See merge request GNOME/glib!2651
2022-05-12 10:24:54 +00:00
Philip Withnall
24909d5e04 Merge branch 'meson-range' into 'main'
meson: Use range() instead of listing all stable versions

See merge request GNOME/glib!2650
2022-05-12 09:53:02 +00:00
TestingPlant
a5e7156a9b Replace single quotes in gio/tests/codegen.py
This makes the formatting more consistent.
2022-05-12 00:29:44 +00:00
Xavier Claessens
5942103937 meson: Use range() instead of listing all stable versions
Note that range(), like in python, has start value included and stop
value excluded. That's why we use last_version + 2.
2022-05-11 14:34:00 -04:00
Philip Withnall
f78e2884d7 tests: Move .test.in template files to tests directory
This makes a bit more sense than having them cluttering up the root
directory.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:12:20 +01:00
Philip Withnall
5129750884 tools: Move glib.supp to tools directory
This tidies up the root directory a bit more.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:11:01 +01:00
Philip Withnall
0dc53687f4 tools: Move glib-gettextize.in to tools directory
This tidies up the root directory a bit more.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:09:17 +01:00
Philip Withnall
7a569f675a tools: Move check-abis.sh from top-level to tools directory
This tidies up the root directory a bit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:06:22 +01:00
Philip Withnall
8a3583ac5c docs: Merge NEWS.pre-1-3 into NEWS
Not clear why they were separate files. This is a bit tidier.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:55 +01:00
Philip Withnall
8a30ce926b docs: Reformat INSTALL.md as Markdown
This improves the formatting, but doesn’t touch the content of the file,
some of which is quite out of date.

I’ll approach rewriting the file in a later commit/MR.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:55 +01:00
Philip Withnall
b92708503d docs: Move INSTALL.in to INSTALL.md
We hadn’t been substituting the version number in properly for a while,
so maybe just abandon that approach and rewrite the instructions to not
refer to a specific version number.

This simplifies things a bit, and means the install instructions can be
read online in GitLab.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:49 +01:00
Philip Withnall
3707c214bc docs: Drop README.win32 in favour of README.win32.md
A human-readable symlink is not particularly helpful.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:49 +01:00
Philip Withnall
cdb0cc8800 docs: Move README.rationale to docs subdirectory
This is part of an effort to rationalise our developer documentation a
bit, putting it all in one directory rather than cluttering up the root
directory.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:02:49 +01:00
Philip Withnall
403bcdafd8 docs: Drop README file in favour of README.md
It was basically a human-readable symlink.

`README.md` seems widely enough accepted now that tooling hopefully
won’t break if we delete the non-Markdown version.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:47:02 +01:00
Sebastian Dröge
06309d50ea Merge branch 'coc' into 'main'
docs: Add a code of conduct document

See merge request GNOME/glib!2648
2022-05-11 11:46:19 +00:00
Philip Withnall
9817ae71d9 ci: Move clang-format-diff.py into CI directory
There’s no point in having it in the root directory when it’s only
really used for CI. It just clutters up the root.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:43:27 +01:00
Philip Withnall
f371d710f3 docs: Drop AUTHORS file in favour of git log
The git log (which didn’t exist when this file was written), and
copyright statements, give credit to these original developers.

Listing their names and e-mail addresses so prominently seems like a
recipe for random people to try e-mailing them for support.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:39:53 +01:00
Philip Withnall
8b6888a6ed docs: Add a code of conduct document
This encodes what GLib is already bound by, as it’s hosted on
gitlab.gnome.org, which is GNOME infrastructure and hence bound by the
GNOME code of conduct.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:30:58 +01:00
Philip Withnall
9a1b0f17d8 Merge branch 'ci-android' into 'main'
ci: Update to latest Android NDK

Closes #2605

See merge request GNOME/glib!2623
2022-05-11 10:11:11 +00:00
Xavier Claessens
3a8622c9e1 ci: Update to latest Android NDK
Move the NDK in the common Fedora image, better have 1 bigger image that
gets cached into runners. It is also less images to maintain.

Fixes: #2605
2022-05-11 10:52:19 +01:00
Pawan Chitrakar
d59f2efbdd Update Nepali translation
(cherry picked from commit f48e0a91a5)
2022-05-11 07:32:40 +00:00
Philip Withnall
2f73cc670c Merge branch 'mapping-test' into 'main'
Moving tests/mapping-test.c to glib/test/mapping.c

See merge request GNOME/glib!2607
2022-05-10 18:05:07 +00:00
Philip Withnall
5eaf305d2e Merge branch 'expand_ghook_tests' into 'main'
Expand ghook unit tests for a better coverage and add more checks

See merge request GNOME/glib!2624
2022-05-10 17:55:24 +00:00
Emmanuel Fleury
3f085d1f4a Moving tests/mapping-test.c to glib/test/mapping.c
Helps issue #1434
2022-05-10 19:23:14 +02:00
Emmanuel Fleury
a67e9cdbe0 Convert tests/mapping-test.c to glib test framework 2022-05-10 19:21:53 +02:00
Simon McVittie
8f2a950362 Merge branch 'check-version-docs' into 'main'
gversion: Clarify that GLIB_CHECK_VERSION is a >= check

See merge request GNOME/glib!2619
2022-05-10 16:31:40 +00:00
Simon McVittie
816abcbb95 Merge branch 'scan-build-fixes' into 'main'
Add some more assertions to help scan-build out

See merge request GNOME/glib!2646
2022-05-10 16:30:18 +00:00
Philip Withnall
e0fe616dbc gvariant: Factor out type check
This will help static analysers, similarly to with the previous commit.

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-10 16:29:22 +01:00
Philip Withnall
e36f2bb243 gproxyaddressenumerator: Factor out type check
This will help static analysers which think that the type of
`priv->proxy_address` could potentially change between freeing
`dest_hostname` and the `g_return_if_fail()` call below, leading to the
code to continue through to `g_object_new()` and use `dest_hostname`
after freeing it.

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-10 16:23:46 +01:00
Philip Withnall
7767978725 gdbusdaemon: Add an assertion to help static analysis of refcounts
This should fix a scan-build warning about the final `name_unref()` here
being a use-after-free.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-10 16:17:38 +01:00
Philip Withnall
86927c39e0 gresource: Assert that resource has correct refcount when unregistering
This should fix a scan-build warning that `resource` is
used-after-freeing in the final `g_resource_unref()` call in
`g_static_resource_fini()`, as `g_resources_unregister_unlocked()` has
already unreffed it.

In reality, each resource has two strong refs on it while active, so the
second unref is correct.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-10 15:53:19 +01:00
Philip Withnall
4b4a5f83b2 Merge branch 'mainloop-test' into 'main'
Remove unnecessary test tests/mainloop-test.c duplicated in glib/tests/mainloop.c

See merge request GNOME/glib!2645
2022-05-10 14:40:17 +00:00
Philip Withnall
b18fec9f23 Merge branch 'meson-version-policy' into 'main'
docs: Add a Meson version policy and bump Meson version in CI

Closes #2596

See merge request GNOME/glib!2641
2022-05-10 11:43:41 +00:00
Pawan Chitrakar
7c4b4cda34 Update Nepali translation
(cherry picked from commit 37f6bc6114)
2022-05-10 09:38:00 +00:00
Emmanuel Fleury
b67de18f40 Remove unnecessary test tests/mainloop-test.c duplicated in glib/tests/mainloop.c
Related to issue #1434
2022-05-10 10:16:13 +02:00
Philip Withnall
c8ea8cafd1 Merge branch 'meson_fixes' into 'main'
meson: Check rres.compiled() before calling rres.returncode()

See merge request GNOME/glib!2642
2022-05-09 12:08:10 +00:00
Sebastian Dröge
91407cd7ef Merge branch 'use-ptrdiff' into 'main'
Cast to ptrdiff_t instead of subtracting by null

See merge request GNOME/glib!2631
2022-05-07 05:46:56 +00:00
TestingPlant
b4b2f75bfd Cast to guintptr instead of subtracting by null
Subtraction by a null pointer is undefined behavior, so it's been
replaced with a cast to guintptr.
2022-05-07 02:01:19 +00:00
illiliti
07fb19ee6e meson: Check rres.compiled() before calling rres.returncode()
As per meson spec, returncode() produces unspecified data if
compiled() == false. Check compiled() first to avoid relying
upon unspecified data.

In addition, muon -- an implemetation of meson written in C goes
further and forbids returning unspecified data. This is a good
decision, but also makes it harder to support applications which
wrongly use meson API. Therefore, application needs to be fixed.
2022-05-07 00:20:33 +03:00
Philip Withnall
cc79d5bc7f ci: Explicitly specify Python installation path on Windows
Meson used to try and guess at the Python path. While this worked fine
for GLib before, it probably didn’t work 100% for other projects, so
Meson have made it an explicit option.

Set that option with the Python path used on the Windows CI machines.

This fixes a Meson warning with Meson >0.60.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:55:28 +01:00
Philip Withnall
f2d24f0b13 ci: Bump CI image versions for new Meson and libpcre versions
As per the previous few commits.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:55:28 +01:00
Dan Nicholson
749b65fd37 subprojects: Update pcre
Recently wrapdb updated pcre from 8.37 (released in 2015!) to the
current 8.45 release. There have been several security fixes between
those releases and currently a buffer overflow is being flagged by
ostree's oss-fuzz project where pcre is installed via wrapdb.

This change was generated by `meson wrap update pcre`.
2022-05-06 13:55:28 +01:00
Philip Withnall
bd1781a356 build: Stop using Meson features deprecated in Meson <0.60
This clears some Meson warnings.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:55:28 +01:00
Xavier Claessens
374be41433 meson: Use meson.can_run_host_binaries()
It is not only shorter than `not meson.is_cross_build() or
meson.has_exe_wrapper()` but also handle the case of cross compiling to
a compatible arch such as building for i386 on an amd64.
2022-05-06 13:17:11 +01:00
Philip Withnall
25ab87d8e5 build: Drop checks and workarounds for older Meson versions
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:01:44 +01:00
Philip Withnall
1bdce46399 build: Bump Meson dependency to 0.60.0
As per the new policy in `docs/meson-version.md`, we can now bump the
dependency.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:01:44 +01:00