Commit Graph

2516 Commits

Author SHA1 Message Date
Philip Withnall
4d1c3e15f9 gdbus-codegen: Rename --glib-min-version to --glib-min-required
This makes it consistent with the `GLIB_MIN_REQUIRED` defines which are
used for API stability/versioning in C code.

It doesn’t otherwise change the behaviour of the `--glib-min-version`
argument.

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

Helps: #1993
2020-01-27 10:11:46 +00:00
Marc-André Lureau
fd61a21ecd Add and use G_SIZEOF_MEMBER() macro
A convenient macro present in the Linux kernel, named FIELD_SIZE() there.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-01-21 19:54:55 +04:00
wouter bolsterlee
809a9210c3 Support multiple directories in GSETTINGS_SCHEMA_DIR
This adds support for specifying multiple directories in the
GSETTINGS_SCHEMA_DIR environment variable by separating the values
using G_SEARCHPATH_SEPARATOR_S (colon on UNIX-like systems).

While programs could already register multiple custom GSettings schema
directories, it was not possible to achieve the same without writing
custom code, e.g. when using the gsettings command line tool.

Fixes #1998.
2020-01-16 10:20:34 +00:00
Matthew Leeds
2a605f6e15 gdbus-codegen: Add call_flags and timeout_msec args
Currently the code generated by gdbus-codegen uses
G_DBUS_CALL_FLAGS_NONE in its D-Bus calls, which occur for each method
defined by the input XML, and for proxy_set_property functions. This
means that if the daemon which implements the methods checks for
G_DBUS_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION and only does interactive
authorization if that flag is present, users of the generated code have
no way to cause the daemon to use interactive authorization (e.g. polkit
dialogs).

If we simply changed the generated code to always use
G_DBUS_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION, its users would have no
way to disallow interactive authorization (except for manually calling
the D-Bus method themselves).

So instead, this commit adds a GDBusCallFlags argument to method call
functions. Since this is an API break which will require changes in
projects using gdbus-codegen code, the change is conditional on the
command line argument --glib-min-version having the value 2.64 or
higher.

The impetus for this change is that I'm changing accountsservice to
properly respect G_DBUS_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION, and
libaccountsservice uses generated code for D-Bus method calls. So
these changes will allow libaccountsservice to continue allowing
interactive authorization, and avoid breaking any users of it which
expect that. See
https://gitlab.freedesktop.org/accountsservice/accountsservice/merge_requests/46

It might make sense to also let GDBusCallFlags be specified for property
set operations, but that is not needed in the case of accountsservice,
and would require significant work and breaking API in multiple places.

Similarly, the generated code currently hard codes -1 as the timeout
value when calling g_dbus_proxy_call*(). Add a timeout_msec argument so
the user of the generated code can specify the timeout as well.

Also, test this new API. In gio/tests/codegen.py we test that the new
arguments are generated if and only of --glib-min-version is used with a
value greater than or equal to 2.64, and in gio/tests/meson.build we
test that the generated code with the new API can be linked against.

The test_unix_fd_list() test also needed modification to continue
working now that we're using gdbus-test-codegen.c with code generated
with --glib-min-version=2.64 in one test.

Finally, update the docs for gdbus-codegen to explain the effect of
using --glib-min-version 2.64, both from this commit and from
"gdbus-codegen: Emit GUnixFDLists if an arg has type `h` w/
min-version".
2020-01-15 09:37:41 -08:00
Philip Withnall
eda096243b docs: Add g_source_set_dispose_function() to documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-16 13:57:28 +00:00
Philip Withnall
467b4d6789 docs: Update GMemoryMonitor listings in docs
Fix a few things missed in code review.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-16 13:57:28 +00:00
Emmanuele Bassi
4ad429c7ca Merge branch 'revert-1277-i-got-it-wrong' into 'master'
Revert "Revert "docs: remove GDBusObjectManager example""

See merge request GNOME/glib!1282
2019-12-16 12:37:34 +00:00
Emmanuele Bassi
f9bbee7db2 Merge branch '1726-codegen-glib-min-version' into 'master'
gdbus-codegen: Emit GUnixFDLists if an arg has type `h` w/ min-version

Closes #1726

See merge request GNOME/glib!1263
2019-12-12 12:49:34 +00:00
Philip Withnall
df8745fabc Revert "Revert "docs: remove GDBusObjectManager example""
This reverts commit df4fb2cd32.

It needed to be coupled with the other commit from !978, and introduces
breakage into the documentation when compiled by itself. My mistake for
not testing properly.

See discussion on https://gitlab.gnome.org/GNOME/glib/merge_requests/1277#note_666761
2019-12-12 11:30:36 +00:00
Philip Withnall
fcc1367383 Merge branch 'gtkdoc-check-fix' into 'master'
Various gtk-doc improvements

See merge request GNOME/glib!1277
2019-12-11 13:02:20 +00:00
Xavier Claessens
df4fb2cd32 Revert "docs: remove GDBusObjectManager example"
This reverts commit 398c048c66.

It got removed because it used to cause build issues, but now that we
have a CI let's hope it won't be a problem any more.
2019-12-11 12:16:27 +00:00
Bastien Nocera
cd6612dfb7 gio: Add GMemoryMonitor to monitor for low-memory
Add a memory monitor object, with D-Bus and Portal based
implementations. The D-Bus implementation uses the Linux-only
low-memory-monitor Freedesktop project.

Low Memory Monitor D-Bus API:
https://hadess.pages.freedesktop.org/low-memory-monitor/

Android API:
https://developer.android.com/reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)

iOS API:
https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle/responding_to_memory_warnings

Win32 API:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.systemevents.lowmemory?view=netframework-4.8

Tizen API:
https://samsung.github.io/TizenFX/master/api/Tizen.Applications.EventManager.SystemEvents.LowMemory.html
2019-12-11 11:44:42 +00:00
Philip Withnall
90f0733858 gdbus-codegen: Add a --glib-min-version argument
This can be used by callers to opt-in to backwards-incompatible changes
to the behaviour or output of `gdbus-codegen` in future. This commit
doesn’t introduce any such changes, though.

Documentation and unit tests included.

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

Helps: #1726
2019-12-11 10:40:07 +00:00
Philip Withnall
b698327b99 Merge branch 'cherry-pick-6ea0dcc6' into 'master'
doc: Add missing --ignore-decorators

Closes #1953

See merge request GNOME/glib!1260
2019-12-03 12:48:37 +00:00
Xavier Claessens
160143ae27 gtk-doc: Ensure we have recent enough version
Older versions won't produce errors, but will silently miss
documentation for a few symbols.
2019-12-01 08:25:04 -05:00
Xavier Claessens
7b65b77a65 doc: Add missing --ignore-decorators
(cherry picked from commit 6ea0dcc6c9af0c0e8cfebc77412838f5174b7dbc)
2019-11-29 18:43:10 +00:00
Emmanuele Bassi
cc3716a943 Merge branch 'thread-safe-getpwnam' into 'master'
glocalvfs: Use thread-safe getpwnam_r() rather than getpwnam()

Closes #1687

See merge request GNOME/glib!681
2019-11-27 11:58:51 +00:00
Philip Withnall
34cb297a86 Merge branch 'wip/nielsdg/g-list-store-find' into 'master'
gliststore: Add item lookup functions

Closes #1011

See merge request GNOME/glib!1096
2019-11-27 11:22:56 +00:00
Philip Withnall
94a800fb9d glib-unix: Add g_unix_get_passwd_entry() function
This is a convenience wrapper around getpwnam_r() which handles all the
memory allocation faff.

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

Helps: #1687
2019-11-26 12:17:04 +00:00
Ernestas Kulik
58ba7d78fb list, slist: Add g_clear_{s,}list()
Although not quite as often-occurring, this should help with constructs
like this:

  if (list)
    {
      g_list_free_full (list, foo);
      list = NULL;
    }

Closes https://gitlab.gnome.org/GNOME/glib/issues/1943
2019-11-25 13:09:25 +01:00
Garrett Regier
6cac760551 task: Add return/propagate API for GValue
This is useful for bindings.

Related: https://gitlab.gnome.org/GNOME/glib/issues/668
2019-11-15 10:37:42 +00:00
Simon McVittie
81936ca580 Make ld executable configurable
Tools like this should be configurable in a cross or native file. In
particular, if we are cross-compiling (with an executable wrapper like
qemu-arm), the build system ld is not necessarily able to manipulate
host system objects.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-11-04 15:08:33 +00:00
Simon McVittie
61f693fb21 Merge branch '1916-objcopy-cross-compilation' into 'master'
tests: Use objcopy from the cross-compilation file, if configured

Closes #1916

See merge request GNOME/glib!1188
2019-10-28 20:06:50 +00:00
Philip Withnall
c73bd53eb8 Merge branch 'fbsd_build' into 'master'
Update documentation with FreeBSD build instructions

See merge request GNOME/glib!1120
2019-10-28 17:26:26 +00:00
Philip Withnall
57aaee76d5 docs: Add objcopy to example cross-compilation file
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1916
2019-10-28 12:11:12 +00:00
Philip Withnall
21f8f89820 gmain: Add GMainContextPusher convenience API
This is like `GMutexLocker`, in that if you are able to use
`g_autoptr()`, it makes popping a `GMainContext` off the thread-default
main context stack easier when exiting a function.

A few uses of `G_GNUC_{BEGIN,END}_IGNORE_DEPRECATIONS` are needed to
avoid warnings when building apps against GLib with
`GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_64`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-23 11:35:58 +01:00
Philip Withnall
0869cdedcf Merge branch '1858-tutorial-deprecated-gobject-api' into 'master'
Fix handling of private object members in GObject property tutorial

Closes #1858

See merge request GNOME/glib!1069
2019-10-10 13:15:39 +00:00
Jonas Ådahl
15e3b6f136 gmessages: Add g_warning_once()
In many places the pattern

    static gboolean warned_once = FALSE;
    if (!warned_once)
      {
        g_warning ("This and that");
        warned_once = TRUE;
      }

is used to not spam the same warning message over and over again. Add a
helper in glib for this, allowing the above statement to be changed to

    g_warning_once ("This and that");
2019-10-09 16:39:31 +02:00
Philip Withnall
45c91d7ed6 Merge branch 'g-os-info' into 'master'
gutils: Add g_get_os_info()

See merge request GNOME/glib!1063
2019-10-08 10:30:24 +00:00
Paolo Bonzini
7bada8394d Add g_array_steal(), g_ptr_array_steal() and g_byte_array_steal()
Closes issue #285
2019-10-07 14:38:24 +02:00
Philip Withnall
d207e19d32 Merge branch 'wip/tingping/pkcs11' into 'master'
gtlscertificate: Add pkcs11-uri property and constructor

Closes #1809

See merge request GNOME/glib!933
2019-10-03 12:12:16 +00:00
Patrick Griffis
b6d8efbebc gtlscertificate: Add support for PKCS #11 backed certificates
This adds properties to allow backends to expose PKCS #11 support.
2019-10-02 10:12:40 -07:00
rim
4d362a5afe Update documentation with FreeBSD build instructions 2019-09-30 23:06:53 +03:00
Philip Withnall
2268f36769 gio-tool: Add a --default-permissions argument to gio copy
This sets the `G_FILE_COPY_DEFAULT_PERMS` flag on the operation,
creating the copied file with default permissions rather than the same
permissions as the source file.

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

Fixes: #174
2019-09-30 14:40:50 +01:00
Robert Ancell
349318e8db gutils: Add g_get_os_info()
Add a new function that gets OS information for /etc/os-release.
2019-09-27 15:47:03 +12:00
Niels De Graef
14ba521b6d gliststore: Add item lookup functions
Currently, there is no quick way to find whether and element is already
part of a list store, except for manually writing a for-loop and calling
`g_list_model_get_item()` and breaking when you find the item.

This is mostly just a small API addition to support this use case.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/1011
2019-09-25 08:37:22 +02:00
Philip Withnall
d0964b72db docs: Fix typo in GConverter{Input,Output}Stream section titles
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-24 12:25:10 +01:00
Nirbheek Chauhan
e3b87b6ffb Merge branch 'add_g_fsync_function' into 'master'
Add a wrapper for fsync() function

Closes #35

See merge request GNOME/glib!1104
2019-09-23 11:22:25 +00:00
Emmanuele Bassi
b96e318f3a docs: Remove priv pointers from the tutorial example
We define `ViewerFile` as a final type with fields directly in the
instance structure. This means we don't have a `priv` pointer to
dereference.
2019-09-20 11:38:47 +02:00
Todd Goyen
3636bb5fe1 Add a wrapper for fsync() function
Closes issue #35
2019-09-18 10:47:23 +02:00
Philip Withnall
3b1e301ab5 gversionmacros: Add version macros for GLib 2.64
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-17 12:24:16 +01:00
Xavier Claessens
65f64f0988 Fix doc build on Windows
This is a work around for this Meson bug:
https://github.com/mesonbuild/meson/issues/5893

Closes: #1888
2019-09-09 08:51:46 -04:00
Philip Withnall
ca60cd3314 tutorial: Add private members to example code in tutorial
Add the private members referred to in the property setting/getting
example, and a finalize function for them, to make the tutorial code
more self-contained.

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

Helps: #1858
2019-08-29 09:20:01 +01:00
Philip Withnall
22b59c91ad tutorial: Stop referring to ->priv for example class
The class has used `G_DECLARE_FINAL_TYPE` for a while now, so doesn’t
have a `priv` struct. Private members are declared inline.

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

Fixes: #1858
2019-08-29 09:19:03 +01:00
Philip Withnall
61912bffb5 tutorial: Improve type safety of property usage in GObject tutorial
This means that if you compile with `-Wswitch-enum`, the compiler will
warn you about properties which you’ve forgotten to handle in
`set_property()` or `get_property()`.

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

Helps: #1858
2019-08-29 09:12:18 +01:00
Nirbheek Chauhan
7952a74721 CODEOWNERS: Add myself as co-owner of Windows stuff
because I am a sucker for punishment.
2019-08-27 12:57:32 +05:30
Nirbheek Chauhan
4387f7b7b6 Merge branch '1803-gio-open-docs' into 'master'
docs: Mention environment variables in `gio open` documentation

Closes #1803

See merge request GNOME/glib!1051
2019-08-26 12:22:06 +00:00
Philip Withnall
b2eb0a6f15 docs: Mention environment variables in gio open documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Closes: #1803
2019-08-25 11:05:07 +03:00
Дилян Палаузов
512655aa12 minor typos in the documentation (a/an) 2019-08-24 19:14:05 +00:00
Philip Withnall
37b2093f28 Merge branch 'contributing-fixes' into 'master'
Remove mentions of mailing lists from the documentation

See merge request GNOME/glib!1002
2019-08-05 10:20:40 +00:00
Philip Withnall
d166a55c64 gfileinfo: Add g_file_info_{get,set}_modification_date_time() APIs
These are alternatives to g_file_info_{get,set}_modification_time(),
which will soon be deprecated due to using the deprecated GTimeVal
type, which is not year 2038 safe.

The new APIs take a GDateTime instead.

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Philip Withnall
dbabd2b8a7 gdatetime: Add g_date_time_format_iso8601() convenience function
This is a simple wrapper around g_date_time_format_iso8601() which
always produces ISO 8601 dates, without people having to remember the
format string for them (and with the convenience of terminating UTC
dates with ‘Z’ rather than ‘+00’).

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

Helps: #1438
2019-07-29 12:27:29 +01:00
Simon McVittie
b76bf3ca72 gobject: Add a g_assert_finalize_object() macro
With modifications by Philip Withnall.

Fixes: #488
2019-07-25 15:23:21 +01:00
Emmanuele Bassi
dd42b8f01f docs: Remove mentions of mailing lists
We use a tag on Discourse, now.
2019-07-23 11:27:30 +01:00
Philip Withnall
249299a76f Merge branch 'doc-fixes' into 'master'
Various doc fixes

See merge request GNOME/glib!982
2019-07-17 10:58:21 +00:00
Emmanuel Fleury
628e448e02 Fixing a small typo in docs/references/gio/gio.xml
Fix issue #1828
2019-07-12 17:49:51 +02:00
Xavier Claessens
61872d60b5 doc: Add gobject 2.62 API 2019-07-10 10:29:04 -04:00
Xavier Claessens
e528577202 doc: Add missing GNativeSocketAddress 2019-07-10 10:29:04 -04:00
Xavier Claessens
255f64cad8 doc: Split API reference per platform
We can only include win32 APIs when building for Windows because gtkdoc
needs to compile the GObject classes for introspection.
2019-07-10 10:29:04 -04:00
Xavier Claessens
e8a123059f doc: Add some missing symbols 2019-07-10 10:11:15 -04:00
Xavier Claessens
a955aacaee doc: Ignore dirent.h which is not part of our API 2019-07-10 10:11:03 -04:00
Xavier Claessens
141a440d0c doc: Add missing GLIB_DEPRECATED_TYPE and friends
They are private but still must be put into sections.txt otherwise
gtkdoc-check complains.
2019-07-10 10:10:25 -04:00
Emmanuele Bassi
c23ee5fabf Merge branch 'garray_binary_search' into 'master'
Add g_array_binary_search() to garray API

Closes #373

See merge request GNOME/glib!850
2019-07-09 10:39:34 +00:00
Emmanuel Fleury
104fca78cd Add g_array_binary_search() to garray API
Original code written by Christian Hergert

Fix issue #373
2019-07-09 12:12:18 +02:00
Chris Packham
3f51694185 docs: update build instructions for selinux
Commit 8cc92bcca ("meson: Turn selinux into a meson feature and make it
auto by default") update the selinux option to be a feature with
instead of a boolean. Update the documentation to reflect this.

Closes: #1823
2019-07-09 17:34:16 +12:00
Emmanuel Fleury
46f70e9901 Adding a function g_array_copy() to glib/garray.c
Original code from Simon van der Linden

Close issue #236
2019-06-27 13:40:26 +02:00
Emmanuel Fleury
0675703af0 Adding g_ptr_array_extend_and_steal() function to glib/garray.c 2019-06-27 12:28:32 +02:00
Emmanuel Fleury
43ad244df2 Adding g_ptr_array_extend() function to glib/garray.c
Related to issue #269
2019-06-26 15:35:28 +02:00
Emmanuel Fleury
86bcc5c942 Adding g_ptr_array_copy() function to glib/garray.c
Related to issue #269
2019-06-26 15:34:47 +02:00
Tristan Partin
b9988e5fc9 Add g_timer_is_active
Helper function for exposing the internal state of a GTimer.
2019-06-21 10:22:41 +00:00
Philip Withnall
fa5996927f Merge branch 'drop-g-disable-deprecated' into 'master'
Drop G_DISABLE_DEPRECATED

Closes #1060 and #638

See merge request GNOME/glib!871
2019-06-14 11:24:25 +00:00
Simental Magana, Marcos
51e7ce2c20 docs: fix typo on arrays examples in gvariant-text
example lists [(1, 2), (3, 4.0)], but mentions numbers
1 and 4 being parsed as integrers, this seems wrong as
4.0 its explicitly parsed as double.

Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
2019-06-12 10:56:07 -05:00
Ondrej Holy
2b5daec05c docs: Add missing gio move options
The `gio move` tool has plenty of options, which are listed by
`gio help move`, however, the `man gio` page doesn't mention them.
Let's add these missing options to the man page as well.
2019-06-07 09:22:04 +02:00
Philip Withnall
1741fc2c6e build: Drop use of G_DISABLE_DEPRECATED from the build system
It’s no longer used in any of the headers. See preceding commits.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-05-30 10:38:45 +01:00
Patrick Storz
56149722ae Add g_get_console_charset
Queries the charset used by the associated console, which does not
necessarily match the charset of the current locale as returned by
g_get_charset.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/1270
2019-05-27 17:51:40 +00:00
Philip Withnall
4da8b7b35a gtestutils: Add g_test_summary() to add summary metadata to unit tests
This is a new function along the same lines as g_test_bug(): to allow
developers to annotate unit tests with information about the test (what
it tests, how it tests it) for future developers to read and learn from.

It will also output this summary as a comment in the test’s TAP output,
which might clarify test results.

Includes a unit test.

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

Fixes: #1450
2019-05-21 12:33:15 +01:00
Marco Trevisan (Treviño)
409c1522bc gisgnal: Add g_clear_signal_handler
It allows to disconnect a signal handler from GObject instance and at the same
time to nullify the signal handler.

Provided also a macro for handler type conversion.
2019-05-20 13:33:41 -05:00
Philip Withnall
0470cccec8 docs: Fix typo in Meson cross-compilation instructions
Meson accepts `--cross-file`, but not `--cross_file`.

Spotted by Carlo Bramini.

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

Fixes: #1782
2019-05-20 12:11:24 +01:00
Philip Withnall
662cddcb4b glib: Deprecate gtester and gtester-report
Add warnings about their deprecation everywhere. The tools will continue
to work until we break API, but will be less well maintained. You should
use TAP for communicating test results to the test harness provided by
your build system or CI system instead.

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

Fixes: #1441
2019-05-14 12:14:54 +01:00
Kalev Lember
e4bd6dd515 Add autoptr support for GRWLock 2019-05-10 12:48:20 +02:00
Marco Trevisan (Treviño)
1d96e94070 gmacros: Add g_autoqueue to automatically free queues
This works as g_auto(s)list already does, and allows to create queues that are
fully auto free'd on destruction.
2019-05-08 14:25:24 -05:00
Christian Hergert
a4c3feb835 queue: add g_queue_insert_before_link() and g_queue_insert_after_link()
This adds two new helpers that allow for inserting pre-allocated GList
elements to the queue similar to existing helpers. This may be advantagous
in some situations such as statically allocated GList elements.
2019-05-01 13:01:14 -07:00
Christian Hergert
b0132bb64f list: add g_list_insert_before_link()
This adds a new insertion helper using a pre-allocated link which may be
advantagous in some situations such as statically linked GList elements.
2019-05-01 13:01:14 -07:00
Philip Withnall
192bf09529 general: Remove a few unhelpful references to ‘master’
Some of these have a negative master/slave connotation, and they add no
value. Change or drop them.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-04-25 09:25:49 +01:00
Philip Withnall
a00d6b08d0 docs: Add GLib 2.62 version macros to glib-sections.txt
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-04-15 12:09:33 +01:00
Philip Withnall
4ac7d2d8e3 docs: Add GLib 2.62 symbols to glib-docs.xml
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-04-15 12:09:16 +01:00
Philip Withnall
9e56d39bb4 docs: Ignore some generated source files
dep-list.c isn’t generated, but contains non-documentation gtk-doc-style
comments which are probably better left in place, since the code is
partially external to GLib.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-15 11:09:32 +00:00
Emmanuele Bassi
7644b6a368 Merge branch 'api-tags' into 'master'
Bump release version for 2.62 series

See merge request GNOME/glib!709
2019-03-06 12:30:12 +00:00
Philip Withnall
6761bb2f57 build: Factor out common gtkdoc flags
Those lists were getting very long. We can’t quite entirely automate the
list generation since Meson doesn’t have a range() function, but we can
at least combine three of them into one.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-06 11:59:03 +00:00
Руслан Ижбулатов
025a346728 W32: Add a simple exception handler
Install a Vectored Exception Handler[0]. Its sole purpose is to catch
some exceptions (access violations, stack overflows, illegal
instructions and debug breaks - by default, but it can be made to catch
any exception for which a code is known) and run a debugger in response.

This allows W32 glib applications to be run without a debugger,
but at the same time allows a debugger to be attached in case
something happens.

The debugger is run with a new console, unless an environment variable
is set to allow it to inherit the console of the crashing process.

The short list of handleable exceptions is there to ensure that
this handler won't run a debugger to "handle" utility exceptions,
such as the one that is used to communicate thread names to a debugger.

The handler is installed to be called last, and shouldn't interfere
with any user-installed handlers.

There's nothing fancy about the way it runs a debugger (it doesn't even
support unicode in paths), and it deliberately avoids using glib code.

The handler will also print a bit of information about the exception
that it caught, and even more information for well-known exceptions,
such as access violation.

The whole scheme is similar to AeDebug[1] and, in fact, the signal-event
gdb command was originally implemented for this very purpose.

[0]: https://docs.microsoft.com/en-us/windows/desktop/debug/vectored-exception-handling
[1]: https://docs.microsoft.com/en-us/windows/desktop/debug/configuring-automatic-debugging
2019-03-06 11:41:56 +00:00
Philip Withnall
e7d091dec1 gversionmacros: add version macros for GLib 2.62
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-06 11:26:28 +00:00
Christoph Reiter
7fa9a2a5da Merge branch 'gi-267-rename-header' into 'master'
Rename gobjectenumtypes.[ch] to glib-enumtypes.[ch]

See merge request GNOME/glib!702
2019-03-04 15:03:40 +00:00
Philip Withnall
95e00c7581 docs: Various markup improvements to glib-mkenums man page
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-03-04 11:14:22 +00:00
Philip Withnall
c3ac761a18 build: Rename gobjectenumtypes.[ch] to glib-enumtypes.[ch]
To reflect the fact that they contain the GObject types for various
enums defined in libglib.

See https://gitlab.gnome.org/GNOME/glib/merge_requests/481#note_451086.

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

Helps: GNOME/gobject-introspection#267
2019-03-04 11:12:59 +00:00
Philip Withnall
175f0243ed docs: Add Ting-Wei Lan as a BSD/kqueue code reviewer
As agreed on
https://gitlab.gnome.org/GNOME/glib/issues/1668#note_450631. Thanks!

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

Helps #1668
2019-03-04 10:38:17 +00:00
Philip Withnall
f703bed5eb docs: Populate CODEOWNERS file
Rename it from CODE-OWNERS and make it follow the documented syntax
supported by GitLab:
https://docs.gitlab.com/ee/user/project/code_owners.html. Currently our
version of GitLab doesn’t support it, but it may do in future.

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

https://gitlab.gnome.org/GNOME/glib/issues/1668
2019-02-21 18:53:47 +00:00
Philip Withnall
1f7d5b85d7 Merge branch 'trash-portal' into 'master'
Support the trash portal

See merge request GNOME/glib!276
2019-02-04 13:38:03 +00:00
Philip Withnall
5d719c782c Merge branch 'script-enum' into 'master'
Define enum types for Unicode enums

See merge request GNOME/glib!481
2019-02-04 12:28:02 +00:00
Matthias Clasen
fc6044a4b1 Define enum types for Unicode enums
We want to stop shipping PangoScript in pango, so
we need a replacement for the type that used to
be provided by pango.
2019-01-31 19:38:26 -05:00
Matthias Clasen
bca4ff7c5e Support the trash portal
When we are in a sandbox, try to trash files via a portal.
It works.
2019-01-31 19:00:19 -05:00