Commit Graph

24386 Commits

Author SHA1 Message Date
Kukuh Syafaat
c4b055c7a4 Update Indonesian translation 2022-01-19 09:35:10 +00:00
Philip Withnall
d83c7b8699 Merge branch 'ascii-formatd-libc-dep' into 'main'
Improve g_ascii_formatd docs and preconditions

See merge request GNOME/glib!2440
2022-01-19 00:14:55 +00:00
Matthias Clasen
6749b343fe Improve g_ascii_formatd docs and preconditions 2022-01-19 00:14:55 +00:00
Jonas Ådahl
283d9e0c15 ghash: Add g_hash_table_new_similar()
This function creates a new hash table, but inherits the functions used
for the hash, comparison, and key/value memory management functions from
another hash table.

The primary use case is to implement a behaviour where you maintain a
hash table by regenerating it, letting the values not migrated be freed.
See the following pseudo code:

```
GHashTable *ht;

init(GList *resources) {
  ht = g_hash_table_new (g_str_hash, g_str_equal, g_free, g_free);
  for (r in resources)
    g_hash_table_insert (ht, strdup (resource_get_key (r)), create_value (r));
}

update(GList *resources) {
  GHashTable *new_ht = g_hash_table_new_similar (ht);

  for (r in resources) {
    if (g_hash_table_steal_extended (ht, resource_get_key (r), &key, &value))
      g_hash_table_insert (new_ht, key, value);
    else
      g_hash_table_insert (new_ht, strdup (resource_get_key (r)), create_value (r));
  }
  g_hash_table_unref (ht);
  ht = new_ht;
}
```
2022-01-18 22:19:55 +01:00
Marc-André Lureau
7d7b52edbd gio: make client connection work with EXTERNAL on win32
D-Bus reference implementation doesn't require more than the claimed
process SID as part of the AUTH initial data for EXTERNAL.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-18 22:09:03 +04:00
Marc-André Lureau
e66b9489b7 gio: re-use win32 SID helpers
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-18 22:08:16 +04:00
Philip Withnall
185e0565e0 Merge branch 'fix-cxx-test-muslc' into 'main'
glib/tests: Fix NULL reference on >= C++11

Closes #2582

See merge request GNOME/glib!2439
2022-01-18 16:34:50 +00:00
Pablo Correa Gómez
b8c4a3e13b
glib/tests: Fix NULL reference on >= C++11
Fixes #2582
2022-01-18 16:51:15 +01:00
Philip Withnall
af982b1cc1 Merge branch 'docs-improvements-i' into 'main'
docs: Improve docs for gdbusutils.c

See merge request GNOME/glib!2414
2022-01-18 14:43:21 +00:00
Maximiliano Sandoval R
525f20a247 docs: Replace broken link 2022-01-18 13:48:43 +00:00
Maximiliano Sandoval R
7118c16347 docs: Improve docs for gdbusutils.c 2022-01-18 13:48:43 +00:00
Marc-André Lureau
d4a66baadb gio: add win32 SID helper functions
The code is based from #1351 patch and existing similar code in
gdbusprivate.c. The next commit will replace that existing code with
those helpers.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-01-18 17:40:02 +04:00
Sebastian Dröge
3b3022dff1 Merge branch 'doc_sync_signals' into 'main'
Make clear in doc that signals are emitted synchroniously

See merge request GNOME/glib!2423
2022-01-18 08:53:21 +00:00
Alexander Schwinn
28d833a075 Make clear in doc that signals are emitted synchroniously 2022-01-18 08:53:20 +00:00
Philip Withnall
6d2dc3f8c2 Merge branch 'remove_paramspec_test' into 'main'
Merge tests/gobject/paramspec-test.c into gobject/tests/param.c

See merge request GNOME/glib!2431
2022-01-17 22:25:28 +00:00
Philip Withnall
eefba53845 Merge branch 'tests_unicode-collate' into 'main'
Remove a disabled test case that was covered by glib/tests/collate.c

See merge request GNOME/glib!2434
2022-01-17 21:03:09 +00:00
Emmanuel Fleury
66ebcbced4 Merge tests/gobject/paramspec-test.c into gobject/tests/param.c
Helps issue #1434
2022-01-17 20:43:27 +00:00
Philip Withnall
aaa89274ad Merge branch 'remove_gvalue_test' into 'main'
Merge tests/gobject/gvalue-test.c with gobject/tests/value.c

See merge request GNOME/glib!2428
2022-01-17 20:40:15 +00:00
Philip Withnall
b828f1001b Merge branch 'illumos-timezone' into 'main'
Fix GDateTime timezone resolution for Illumos

Closes #2550

See merge request GNOME/glib!2409
2022-01-17 19:28:07 +00:00
Sebastian Dröge
36bd5d0a98 Merge branch '2579-install-paths' into 'main'
docs: Update some outdated paths in INSTALL.in

Closes #2579

See merge request GNOME/glib!2436
2022-01-17 17:49:01 +00:00
Philip Withnall
b824a16fce docs: Update some outdated paths in INSTALL.in
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2579
2022-01-17 16:21:22 +00:00
Philip Withnall
ea18fcff58 Merge branch 'mwleeds/fix-codegen-typo' into 'main'
gdbus-codegen: Fix a typo in a comment

See merge request GNOME/glib!2426
2022-01-17 15:38:50 +00:00
Yuri Chornoivan
af1ae95292 Update Ukrainian translation 2022-01-17 15:09:12 +00:00
Hugo Carvalho
8989aae2d0 Update Portuguese translation 2022-01-17 14:38:26 +00:00
Philip Withnall
a7a5b24f86 Merge branch 'pgriffis/gtlscertificate-password' into 'main'
gtlscertificate: Add ability to load PKCS#12 encrypted files

See merge request GNOME/glib!2239
2022-01-17 11:21:18 +00:00
Aurimas Černius
11f591dc15 Updated Lithuanian translation 2022-01-16 21:30:36 +02:00
Emmanuel Fleury
cddce179f5 Remove a disabled test case that was covered by glib/tests/collate.c
Related to issue #1434
2022-01-15 13:44:15 +01:00
Tim Mooney
8cc71d35d0 Fix GDateTime timezone resolution for Illumos
Closes #2550
2022-01-14 22:39:56 -06:00
Nirbheek Chauhan
41d80f5029 Merge branch 'wip/pwithnall/2565-array-preprocessor' into 'main'
tests: Fix compilation failure on msys2-mingw64

Closes #2565

See merge request GNOME/glib!2419
2022-01-14 14:47:53 +00:00
Marek Černocký
660b6f6022 Updated Czech translation 2022-01-14 12:04:11 +01:00
Boyuan Yang
4ee591f5f2 Update Chinese (China) translation 2022-01-13 20:27:46 +00:00
Emmanuel Fleury
86fedcfb93 Merge tests/gobject/gvalue-test.c with gobject/tests/value.c
Helps issue #1434
2022-01-12 21:51:05 +01:00
Phaedrus Leeds
6342922d27 gdbus-codegen: Fix a typo in a comment 2022-01-11 20:03:13 -08:00
Emmanuele Bassi
dc8fa924ae Merge branch 'remove-btrfs-optimization' into 'main'
gfileutils: Remove outdated BTRFS fsync optimization from set_contents

See merge request GNOME/glib!2425
2022-01-11 18:58:13 +00:00
Sebastian Keller
d9e001e2cd gfileutils: Remove outdated BTRFS fsync optimization from set_contents
This code was skipping fsync on BTRFS because of an old guarantee about
the overwrite-by-rename behavior that no longer holds true. This has
been confirmed by the BTRFS developers to no longer be guaranteed since
Kernel 3.17 (August 2014), but it was guaranteed when this optimization
was first introduced in 2010.

This could result in empty files after crashes in applications using
g_file_set_contents(). Most prominently this might have been the cause
of dconf settings getting lost on BTRFS after crashes due to the
frequency with which such writes can happen in dconf.

See: https://gitlab.gnome.org/GNOME/dconf/-/issues/73
2022-01-11 19:07:01 +01:00
Patrick Griffis
96ce3feeb9 gtlscertificate: Add ability to load PKCS #12 encrypted files
This depends on the GTlsBackend implementing these properties
2022-01-07 11:27:56 -06:00
Sebastian Dröge
ae0ec9b753 Merge branch 'testutils-docs' into 'main'
gtestutils: Fix minor typos in the g_test_get_filename() docs

See merge request GNOME/glib!2417
2022-01-07 10:52:47 +00:00
Philip Withnall
233611fe42 tests: Fix compilation failure on msys2-mingw64
This is a follow-up from commit 995823b9d9, which added the condition
```
```
to the array test. On most platforms, both of those symbols are numeric
literals, but on 64-bit Windows `G_MAXSIZE` includes some widening
casts, which means it can’t be used in a preprocessor condition.

We don’t expose an appropriate symbol in `glibconfig.h` which could be
used instead, but the standard `*_WIDTH` symbols from `limits.h` will be
identical and can be used instead.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2565
2022-01-06 13:22:23 +00:00
Philip Withnall
84202a2ef0 guniprop: Set jungseong and jongseong points to zero-width for Old Korean
This mirrors what `wcwidth()` from glibc does as of June 2020 (commit
6e540caa2).

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2564
2022-01-06 13:11:24 +00:00
Philip Withnall
e6b85bc05c gtestutils: Fix minor typos in the g_test_get_filename() docs
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-01-06 12:52:00 +00:00
Philip Withnall
2c958470d2 Merge branch 'gcc-win-cross-build-fix' into 'main'
Fix cross build error for Windows with gcc

Closes #2571

See merge request GNOME/glib!2416
2022-01-06 12:08:36 +00:00
229f7d4a03 Fix cross build error for Windows with gcc
This commit puts an additional underscore before the external symbol
`_g_binary_test1_resource_data` when using gcc for Windows, to match
the compiler's expectation.

Fixes #2571

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-01-06 09:20:54 +01:00
Nirbheek Chauhan
7f071de3e3 Merge branch 'main' into 'main'
Use meson dependency to link against apple framework

See merge request GNOME/glib!2413
2022-01-06 06:25:13 +00:00
Kelvin Zhang
2a4422b0f2 Use meson dependency to link against apple framework
Using ld_flags would work, but that does not propagate ldflags to users
of glib. Meson's dependency() call will propagate apple framework
dependencies to downstream users.
2022-01-05 11:32:32 -08:00
Daniel Mustieles
614a4560c3 Updated Spanish translation 2022-01-04 12:17:28 +01:00
Sebastian Dröge
d5ebd6af70 Merge branch 'bilelmoussaoui/g-i' into 'main'
paramspec: fix unref annotation

See merge request GNOME/glib!2412
2021-12-30 12:53:18 +00:00
Bilal Elmoussaoui
2f9b3ec6cc paramspec: fix unref annotation 2021-12-30 12:40:47 +00:00
Yosef Or Boczko
301f00cdd8 Update Hebrew translation 2021-12-29 16:29:41 +00:00
Emmanuele Bassi
32b4bcb668 Merge branch 'content-type-guess-filename' into 'main'
annotate `g_content_type_guess` parameter as filename

See merge request GNOME/glib!2411
2021-12-28 21:02:38 +00:00
Andy Russell
82ece18644
annotate g_content_type_guess parameter as filename 2021-12-28 15:36:54 -05:00