Commit Graph

28922 Commits

Author SHA1 Message Date
Matthias Clasen
3d5d3bceea docs: Move the GBytesIcon SECTION
Move the contents into the struct docs.

Helps: #3037
2023-10-17 11:19:44 +01:00
Matthias Clasen
93788dfb07 docs: Move the GAppInfoMonitor SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-17 11:19:41 +01:00
Matthias Clasen
bf9bf0b0cc docs: Move the GBufferedOutputStream SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-17 11:19:38 +01:00
Matthias Clasen
08990badb6 docs: Move the GBufferedInputStream SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-17 11:19:27 +01:00
Matthias Clasen
f7b5e3b37e docs: Move the GAsyncResult SECTION
Move the content to the struct docs.

Helps: #3037
2023-10-17 10:57:22 +01:00
Matthias Clasen
331c137ee1 docs: Move the GAsyncInitable SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-17 10:57:14 +01:00
Matthias Clasen
840cfd1ab7 docs: Move the GApplicationCommandline SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-17 10:57:10 +01:00
Matthias Clasen
75de7e8628 docs: Move the GApplication SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-17 10:57:06 +01:00
Matthias Clasen
61d869467f docs: Move the GAppInfo SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-17 10:57:01 +01:00
Matthias Clasen
5ab04d05dc docs: Move the GActionMap SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-17 10:56:54 +01:00
Matthias Clasen
524610ab6e docs: Move the GActionGroup SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-17 10:56:50 +01:00
Matthias Clasen
34bdf32b38 docs: Move the GAction SECTION
Move it to the struct docs.

Helps: #3037
2023-10-17 10:56:42 +01:00
Philip Withnall
47fc75155c ci: Update from clang-format-11 to clang-format-14
Since upgrading to Debian Bookworm in 13c359536, `clang-format-14` is
what’s available in the CI image.

This should fix the style-check-advisory CI job.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-17 10:13:50 +01:00
Philip Withnall
43b5985d03 Merge branch 'migrate-to-gi-docgen3' into 'main'
Switch to using gi-docgen for docs (batch 3)

See merge request GNOME/glib!3645
2023-10-16 23:08:36 +00:00
Matthias Clasen
bedf11b330 docs: Move the GClosure SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-16 23:35:05 +01:00
Matthias Clasen
7eba4e8f49 docs: Move the GTypeModule SECTION
Move the content to the struct docs.

Helps: #3037
2023-10-16 23:34:59 +01:00
Matthias Clasen
bc084d8780 docs: Move the GTypePlugin SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-16 23:34:53 +01:00
Matthias Clasen
8009afe73d docs: Move the GParamSpec SECTION
Move the content to the struct docs. Also drop the paramspecs SECTION,
as it was largely duplicated information.

Helps: #3037
2023-10-16 23:34:48 +01:00
Matthias Clasen
6e1d5302ed docs: Move the GSignalGroup SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-16 23:34:44 +01:00
Matthias Clasen
36d65922e2 docs: Move the GValueArray SECTION
Move the contents to the struct docs.

Helps: #3037
2023-10-16 23:34:39 +01:00
Matthias Clasen
95717eacea docs: Move the signal SECTION
Move the content to the new signals.md file.

Helps: #3037
2023-10-16 23:34:35 +01:00
Matthias Clasen
f3eac349f9 docs: Move the GType SECTION
Move the contents to the new types.md files.

Helps: #3037
2023-10-16 23:34:29 +01:00
Matthias Clasen
f471ebd300 docs: Move the GObject SECTION
Move the contents into the struct docs.

Helps: #3037
2023-10-16 23:34:24 +01:00
Matthias Clasen
89fe3bc4e4 docs: Move the GBindingGroup SECTION
Move the content to the struct docs.

Helps: #3037
2023-10-16 23:34:20 +01:00
Matthias Clasen
e7720a2c1a docs: Move the GBinding SECTION
Move the content into the struct docs.

Helps: #3037
2023-10-16 23:34:04 +01:00
Philip Withnall
fa165204ae Merge branch 'fix-warnings-clang-windows' into 'main'
Fix warnings with Clang on Windows and enable --Werror in CI

See merge request GNOME/glib!3635
2023-10-16 21:29:09 +00:00
Khalid Abu Shawarib
c70b8a7500 gio-tool: add a "default-modified-time" option
As with `default-permissions` option, this overrides the `perserve`
option.
2023-10-16 18:12:49 +03:00
Khalid Abu Shawarib
db01c11540 gio: add tests for default modification time flag
Add test cases for the G_FILE_COPY_TARGET_DEFAULT_MODIFIED_TIME
file copy flag.
2023-10-16 18:12:49 +03:00
Khalid Abu Shawarib
8d91430279 gio: add a file copy flag for default modification time
Add a default modification timestamp flag to g_file_copy so that it
doesn't copy the modification time from the source file as it does by
default. Similarly to G_FILE_COPY_TARGET_DEFAULT_PERMS, this flag
overrides the G_FILE_COPY_ALL_METADATA flag.

Fixes: https://gitlab.gnome.org/GNOME/glib/-/issues/3140
2023-10-16 18:12:49 +03:00
Michael Catanzaro
6d460f6c7e Merge branch 'ebassi/mips-test-check' into 'main'
build: Simplify MIPS test check

See merge request GNOME/glib!3641
2023-10-16 14:32:29 +00:00
Emmanuele Bassi
af36393e60 Build libgirepository as a GLib sub-library
The introspection API has lived out of tree far too long. It has the
same ABI guarantees as the rest of GLib, so it has no reason to be split
from the main library.

The gobject-introspection project can depend on libgirepository, and the
language bindings can drop the gobject-introspection-1.0 dependency.
2023-10-16 15:24:08 +01:00
Emmanuele Bassi
7aafd8c7d7 Merge branch 'girepository' into ebassi/girepository
Move girepository (and its full history) from gobject-introspection into
glib.
2023-10-16 15:21:35 +01:00
Luca Bacci
e56bb89b83 CI: Remove workaround for Python in MSYS2 jobs
It was added in 13fe2e0c, but it's now unnecessary since
the issue has been fixed.

See https://github.com/msys2/MINGW-packages/issues/17415
2023-10-16 15:02:18 +02:00
Luca Bacci
ee4aaed516 CI: Enable --Werror in MSYS2 CLANG64 job 2023-10-16 15:02:18 +02:00
Luca Bacci
4aa051cafb valgrind.h: Fix macro definition for Windows x64
The Windows x64 ABI follows the LLP64 model, so unsigned long int is 32 bits

Fixes the following warnings when compiling for Windows x64:

  ../glib/gobject/gatomicarray.c:85:3: warning: cast to smaller integer type 'unsigned long' from 'gpointer' (aka 'void *') [-Wvoid-pointer-to-int-cast]
    VALGRIND_MALLOCLIKE_BLOCK (mem, real_size - sizeof (GAtomicArrayMetadata),
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../glib/glib/valgrind.h:6479:5: note: expanded from macro 'VALGRIND_MALLOCLIKE_BLOCK'
      VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK,       \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../glib/glib/valgrind.h:203:15: note: expanded from macro 'VALGRIND_DO_CLIENT_REQUEST_STMT'
    do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                        \
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../glib/glib/valgrind.h:417:20: note: expanded from macro 'VALGRIND_DO_CLIENT_REQUEST_EXPR'
      _zzq_args[1] = (unsigned long int)(_zzq_arg1);                \
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

See https://bugs.kde.org/show_bug.cgi?id=427146
2023-10-16 15:02:03 +02:00
Emmanuele Bassi
ccc36a2fde build: Simplify MIPS test check
Make the condition more readable, and easy to extend if necessary.

Follow-up to: !3640
2023-10-16 13:11:27 +01:00
Philip Withnall
0a6e19feee Merge branch 'test5-no-mips' into 'main'
GIO/tests: skip test_resources_binary on MIPS platforms

See merge request GNOME/glib!3640
2023-10-16 12:05:06 +00:00
YunQiang Su
8105916998 GIO/tests: skip test_resources_binary on MIPS platform
There are some flavors of MIPS ABIs, such like r6 vs legacy,
nan2008 vs nan1985 etc.

The `cc -r` may not produce the correct elf binaries.
So let's skip this test for MIPS.
2023-10-16 07:20:21 -04:00
Philip Withnall
481839c190 Merge branch 'win32-unicode-api' into 'main'
Windows: Compile with the UNICODE / _UNICODE macros

See merge request GNOME/glib!3623
2023-10-16 08:58:41 +00:00
Philip Withnall
54c9d9c0f2 Merge branch 'docs-python-gdb-fixes' into 'main'
Cleanup and add content to glib debugging using gdb scripts

See merge request GNOME/glib!3638
2023-10-16 08:50:40 +00:00
Sid
027f4b4c73 Cleanup and add content to glib debugging using gdb scripts 2023-10-16 08:50:39 +00:00
Philip Withnall
b8e805b8c6 Merge branch 'update-bit-symbol' into 'main'
gutils: Use international symbol for bits

See merge request GNOME/glib!3552
2023-10-16 08:25:03 +00:00
getsnoopy
5422d2fdb8 gutils: Use international symbol for bits 2023-10-16 08:25:03 +00:00
Philip Withnall
0a0f1f662c Merge branch 'g-strv-builder-take' into 'main'
gstrvbuilder: Add g_strv_builder_take

See merge request GNOME/glib!3637
2023-10-16 08:21:34 +00:00
Emmanuele Bassi
03d6c16434 Move girepository 2023-10-15 17:56:05 +01:00
Guido Günther
bc4ba05d34 gstrvbuilder: Add g_strv_builder_take
g_strv_builder_take() allows to transfer ownership of the passed in
string.

This can be useful to avoid additional allocations when using functions
that transfer ownership to the caller like g_strdup_printf().

The testcase uses g_strv_builder_take and g_strv_builder_add to demo
that calls can be mixed.
2023-10-15 15:45:58 +02:00
Michael Catanzaro
046f70cc0d Merge branch 'wip/kabus/task-return' into 'main'
Use g_task_return in task threads

See merge request GNOME/glib!3633
2023-10-12 12:27:29 +00:00
Khalid Abu Shawarib
dc0af83486 Use g_task_return in task threads 2023-10-12 12:27:28 +00:00
Luca Bacci
dfeb671c36 tests/win32: Initialize DWORD with the right constant
We were initializing a DWORD (unsigned 32 bit) with a constant
of bigger rank (G_MAXSIZE) on 64 bit systems.

Fixes the following warnings on CLang when compiling for x64:

  ../glib/glib/tests/win32.c:47:14: warning: implicit conversion from 'unsigned long long' to 'DWORD' (aka 'unsigned long') changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
    DWORD bp = G_MAXSIZE;
          ~~   ^~~~~~~~~
  glib/glibconfig.h:88:19: note: expanded from macro 'G_MAXSIZE'
  #define G_MAXSIZE       G_MAXUINT64
                          ^~~~~~~~~~~
  ../glib/glib/gtypes.h:107:21: note: expanded from macro 'G_MAXUINT64'
  #define G_MAXUINT64     G_GUINT64_CONSTANT(0xffffffffffffffff)
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  glib/glibconfig.h:69:52: note: expanded from macro 'G_GUINT64_CONSTANT'
  #define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))
                                                     ^~~~~~~~
  <scratch space>:96:1: note: expanded from here
  0xffffffffffffffffULL
  ^~~~~~~~~~~~~~~~~~~~~
2023-10-12 11:45:33 +02:00
Luca Bacci
8264b13737 tests/cxx: Do not assume that NULL is a pointer type starting with C++11
Many toolchain did not change the definition of NULL to avoid introducing
breaking changes in existing codebases. For example, on Windows NULL is
0 (int) regardless of the C++ standard in use.

Fixes the following warnings on CLang when compiling for Windows:

  ../glib/glib/tests/cxx.cpp:539:34: warning: missing sentinel in function call [-Wsentinel]
    g_test_init (&argc, &argv, NULL);
                                   ^
                                   , nullptr
  ../glib/glib/gtestutils.h:298:9: note: function has been explicitly marked sentinel here
  void    g_test_init                     (int            *argc,
          ^

  ../glib/gio/tests/cxx.cpp:62:34: warning: missing sentinel in function call [-Wsentinel]
    g_test_init (&argc, &argv, NULL);
                                   ^
                                   , nullptr
  ../glib/glib/gtestutils.h:298:9: note: function has been explicitly marked sentinel here
  void    g_test_init                     (int            *argc,
          ^
2023-10-12 11:45:03 +02:00