Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libdex for openSUSE:Factory checked in at 2024-10-08 17:23:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdex (Old) and /work/SRC/openSUSE:Factory/.libdex.new.19354 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libdex" Tue Oct 8 17:23:43 2024 rev:7 rq:1205474 version:0.8.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libdex/libdex.changes 2024-06-03 17:45:06.102639325 +0200 +++ /work/SRC/openSUSE:Factory/.libdex.new.19354/libdex.changes 2024-10-08 17:24:23.056967434 +0200 @@ -1,0 +2,14 @@ +Tue Sep 17 06:35:24 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com> + +- Update to version 0.8.0: + + Various build system improvements to help catch correctness + issues. + + Increased assertions in fibers to help Coverity discover usage + patterns. + + Avoid releasing discarded future until chained future is + released. + + Fix overflow in extremely large timeout calculation. + + Various introspection fixes. + + Fix inclusion from C++. + +------------------------------------------------------------------- Old: ---- libdex-0.6.1.obscpio New: ---- libdex-0.8.0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdex.spec ++++++ --- /var/tmp/diff_new_pack.qntEaa/_old 2024-10-08 17:24:23.953004829 +0200 +++ /var/tmp/diff_new_pack.qntEaa/_new 2024-10-08 17:24:23.957004996 +0200 @@ -20,7 +20,7 @@ %bcond_with profiling Name: libdex -Version: 0.6.1 +Version: 0.8.0 Release: 0 Summary: Library supporting "Deferred Execution" for GNOME and GTK License: LGPL-2.1-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.qntEaa/_old 2024-10-08 17:24:23.989006332 +0200 +++ /var/tmp/diff_new_pack.qntEaa/_new 2024-10-08 17:24:23.993006499 +0200 @@ -3,7 +3,7 @@ <service name="obs_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://gitlab.gnome.org/GNOME/libdex.git</param> - <param name="revision">0.6.1</param> + <param name="revision">0.8.0</param> <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> <param name="versionrewrite-pattern">v?(.*)\+0</param> <param name="versionrewrite-replacement">\1</param> ++++++ libdex-0.6.1.obscpio -> libdex-0.8.0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/NEWS new/libdex-0.8.0/NEWS --- old/libdex-0.6.1/NEWS 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/NEWS 2024-09-16 23:59:30.000000000 +0200 @@ -1,7 +1,33 @@ -libdex 0.6.1 +libdex 0.8.0 ============ - * Adds Fiber support for macOS on Apple Silicon +This is a stable release for GNOME 47.0 + + * Various build system improvements to help catch correctness issues. + * Increased assertions in fibers to help Coverity discover usage patterns. + * Avoid releasing discarded future until chained future is released. + * Fix overflow in extremely large timeout calculation. + * Various introspection fixes. + * Fix inclusion from C++. + +libdex 0.7.1 +============ + +This is an beta release for GNOME 47.beta + + * Allow disabling stack protector on systems that do not support it + * Always use ucontext.h on macOS to simplify integration there + +libdex 0.7.0 +============ + +This is an alpha release for GNOME 47.alpha + + * Various build fixes for macOS 14+ + * dex_future_new_true() and dex_future_new_false() convenience macros + * Avoid possible linking of asm.S on Linux so that we do not make the + GCC annobin checker unhappy. + * Allow a NULL GObject for dex_future_new_take_object(). libdex 0.6.0 ============ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/README.md new/libdex-0.8.0/README.md --- old/libdex-0.6.1/README.md 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/README.md 2024-09-16 23:59:30.000000000 +0200 @@ -67,7 +67,7 @@ ## Implementation Notes -While Dex is using GObject and GIO, it implements it's own fundamental type +While Dex is using GObject and GIO, it implements its own fundamental type (DexObject) for which all other types inherit. Given the concurrent and parallel nature of futures and the many situations to support, it is the authors opinion that the performance drawbacks of such a flexible type as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/TODO.md new/libdex-0.8.0/TODO.md --- old/libdex-0.6.1/TODO.md 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/TODO.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -# TODO - - * Implicit vs explicit support for deferred execution. If we have - some "await" support, that is when we can kick off work items. If - language bindings wrap Dex, this is where they can make things - implicit depending on the language. - * Generator API to match Fiber semantics w/ yield - * More/better support for non-standard API using DexAsyncPair - * Some integration with various I/O API in GLib like GIOChannel - or other FD based tooling for futures, possibly GPollFD? - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/libdex.doap new/libdex-0.8.0/libdex.doap --- old/libdex-0.6.1/libdex.doap 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/libdex.doap 2024-09-16 23:59:30.000000000 +0200 @@ -9,7 +9,7 @@ <shortname>libdex</shortname> <shortdesc>Future-based programming for GLib-based applications and libraries</shortdesc> <homepage rdf:resource="https://gitlab.gnome.org/GNOME/libdex" /> - <license rdf:resource="https://spdx.org/licenses/LGPL-3.0-or-later.html" /> + <license rdf:resource="https://spdx.org/licenses/LGPL-2.1-or-later.html" /> <programming-language>C</programming-language> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/meson.build new/libdex-0.8.0/meson.build --- old/libdex-0.6.1/meson.build 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/meson.build 2024-09-16 23:59:30.000000000 +0200 @@ -1,5 +1,5 @@ project('libdex', 'c', - version: '0.6.1', + version: '0.8.0', meson_version: '>= 0.62.0', default_options: [ 'warning_level=2', 'werror=false', 'c_std=gnu11', ], ) @@ -122,11 +122,12 @@ '-Wundef', '-Wuninitialized', '-Wunused', + '-fstrict-flex-arrays=3', '-fno-strict-aliasing', ['-Werror=format-security', '-Werror=format=2'], '-FImsvc_recommended_pragmas.h', ] -if get_option('buildtype') != 'plain' +if get_option('buildtype') != 'plain' and get_option('stack-protector') if host_machine.system() != 'windows' test_c_args += '-fstack-protector-strong' endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/meson_options.txt new/libdex-0.8.0/meson_options.txt --- old/libdex-0.6.1/meson_options.txt 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/meson_options.txt 2024-09-16 23:59:30.000000000 +0200 @@ -4,6 +4,9 @@ option('examples', type: 'boolean', value: true, description: 'Build example programs') +option('stack-protector', + type: 'boolean', value: true, + description: 'Enable stack-protector') option('vapi', type: 'boolean', value: true, description: 'Generate vapi data (requires vapigen)') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/asm.S new/libdex-0.8.0/src/asm.S --- old/libdex-0.6.1/src/asm.S 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/asm.S 2024-09-16 23:59:30.000000000 +0200 @@ -14,21 +14,9 @@ # define GET getmcontext #endif -#if defined(__APPLE__) -# if defined(__i386__) -# define NEEDX86CONTEXT 1 -# define SET _setmcontext -# define GET _getmcontext -# elif defined(__x86_64__) -# define NEEDAMD64CONTEXT 1 -# define SET _setmcontext -# define GET _getmcontext -# elif defined(__aarch64__) -# else -# define NEEDPOWERCONTEXT 1 -# define SET __setmcontext -# define GET __getmcontext -# endif +#ifdef __APPLE__ +/* We no longer support asm.S task switching on macOS */ +# error "asm.S is not supported on Apple operating systems #endif #if defined(__linux__) && defined(__mips__) && !defined(HAVE_UCONTEXT_H) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-aio.c new/libdex-0.8.0/src/dex-aio.c --- old/libdex-0.6.1/src/dex-aio.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-aio.c 2024-09-16 23:59:30.000000000 +0200 @@ -41,6 +41,8 @@ /** * dex_aio_read: + * @buffer: (array length=count) (element-type guint8) (out caller-allocates) + * @count: (in) * * An asynchronous `pread()` wrapper. * @@ -63,6 +65,7 @@ /** * dex_aio_write: + * @buffer: (array length=count) (element-type guint8) * * An asynchronous `pwrite()` wrapper. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-async-pair.c new/libdex-0.8.0/src/dex-async-pair.c --- old/libdex-0.6.1/src/dex-async-pair.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-async-pair.c 2024-09-16 23:59:30.000000000 +0200 @@ -219,7 +219,7 @@ * * Gets the cancellable for the async pair. * - * If the DexAsyncPair is discarded by it's callers, then it will automatically + * If the DexAsyncPair is discarded by its callers, then it will automatically * be cancelled using g_cancellable_cancel(). * * Returns: (transfer none): a #GCancellable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-block.c new/libdex-0.8.0/src/dex-block.c --- old/libdex-0.6.1/src/dex-block.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-block.c 2024-09-16 23:59:30.000000000 +0200 @@ -253,7 +253,7 @@ * @future: (transfer full): a #DexFuture to process * @scheduler: (nullable): a #DexScheduler or %NULL * @kind: the kind of block - * @callback: (scope async): the callback for the block + * @callback: (scope notified): the callback for the block * @callback_data: the data for the callback * @callback_data_destroy: closure destroy for @callback_data * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-fiber.c new/libdex-0.8.0/src/dex-fiber.c --- old/libdex-0.6.1/src/dex-fiber.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-fiber.c 2024-09-16 23:59:30.000000000 +0200 @@ -366,9 +366,9 @@ * #DexFiberScheduler is a sub-scheduler to a #DexScheduler that can swap * into and schedule runnable #DexFiber. * - * A #DexScheduler should have one of these #GSource attached to it's + * A #DexScheduler should have one of these #GSource attached to its * #GMainContext so that fibers can be executed there. When a thread - * exits, it's fibers may need to be migrated. Currently that is not + * exits, its fibers may need to be migrated. Currently that is not * implemented as we do not yet destroy #DexThreadPoolWorker. */ DexFiberScheduler * @@ -394,21 +394,24 @@ dex_fiber_scheduler_register (DexFiberScheduler *fiber_scheduler, DexFiber *fiber) { - g_return_if_fail (fiber_scheduler != NULL); - g_return_if_fail (DEX_IS_FIBER (fiber)); - g_return_if_fail (fiber->link.data == fiber); - g_return_if_fail (fiber->fiber_scheduler == NULL); - g_return_if_fail (fiber->exited == FALSE); - g_return_if_fail (fiber->running == FALSE); - g_return_if_fail (fiber->runnable == FALSE); - g_return_if_fail (fiber->released == FALSE); + g_assert (fiber_scheduler != NULL); + g_assert (DEX_IS_FIBER (fiber)); dex_ref (fiber); g_mutex_lock (&fiber_scheduler->mutex); + + g_assert (fiber->link.data == fiber); + g_assert (fiber->fiber_scheduler == NULL); + g_assert (fiber->exited == FALSE); + g_assert (fiber->running == FALSE); + g_assert (fiber->runnable == FALSE); + g_assert (fiber->released == FALSE); + fiber->fiber_scheduler = fiber_scheduler; fiber->runnable = TRUE; g_queue_push_tail_link (&fiber_scheduler->runnable, &fiber->link); + g_mutex_unlock (&fiber_scheduler->mutex); if (dex_thread_storage_get ()->fiber_scheduler != fiber_scheduler) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-future.c new/libdex-0.8.0/src/dex-future.c --- old/libdex-0.6.1/src/dex-future.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-future.c 2024-09-16 23:59:30.000000000 +0200 @@ -389,6 +389,7 @@ { gboolean has_awaiting = FALSE; gboolean matched = FALSE; + GQueue discarded = G_QUEUE_INIT; g_return_if_fail (DEX_IS_FUTURE (future)); g_return_if_fail (DEX_IS_FUTURE (chained)); @@ -426,12 +427,20 @@ has_awaiting |= cf->awaiting; g_queue_unlink (&future->chained, &cf->link); - dex_chained_future_free (cf); + g_queue_push_tail_link (&discarded, &cf->link); } } dex_object_unlock (future); + /* Release chained futures outside of the @future lock */ + while (discarded.head != NULL) + { + DexChainedFuture *cf = discarded.head->data; + g_queue_unlink (&discarded, &cf->link); + dex_chained_future_free (cf); + } + /* If we discarded the chained future and there are no more futures * awaiting our response, then request the class discard the future, * possibly cancelling anything in flight. @@ -450,7 +459,7 @@ /** * dex_future_then: (constructor) * @future: (transfer full): a #DexFuture - * @callback: (scope async): a callback to execute + * @callback: (scope notified): a callback to execute * @callback_data: closure data for @callback * @callback_data_destroy: destroy notify for @callback_data * @@ -480,7 +489,7 @@ /** * dex_future_then_loop: (constructor) * @future: (transfer full): a #DexFuture - * @callback: (scope async): a callback to execute + * @callback: (scope notified) (closure callback_data) (destroy callback_data_destroy): a callback to execute * @callback_data: closure data for @callback * @callback_data_destroy: destroy notify for @callback_data * @@ -512,7 +521,7 @@ /** * dex_future_catch_loop: (constructor) * @future: (transfer full): a #DexFuture - * @callback: (scope async): a callback to execute + * @callback: (scope notified) (closure callback_data) (destroy callback_data_destroy): a callback to execute * @callback_data: closure data for @callback * @callback_data_destroy: destroy notify for @callback_data * @@ -544,7 +553,7 @@ /** * dex_future_finally_loop: (constructor) * @future: (transfer full): a #DexFuture - * @callback: (scope async): a callback to execute + * @callback: (scope notified) (closure callback_data) (destroy callback_data_destroy): a callback to execute * @callback_data: closure data for @callback * @callback_data_destroy: destroy notify for @callback_data * @@ -576,7 +585,7 @@ /** * dex_future_catch: (constructor) * @future: (transfer full): a #DexFuture - * @callback: (scope async): a callback to execute + * @callback: (scope notified) (closure callback_data) (destroy callback_data_destroy): a callback to execute * @callback_data: closure data for @callback * @callback_data_destroy: destroy notify for @callback_data * @@ -606,7 +615,7 @@ /** * dex_future_finally: (constructor) * @future: (transfer full): a #DexFuture - * @callback: (scope async): a callback to execute + * @callback: (scope notified) (closure callback_data) (destroy callback_data_destroy): a callback to execute * @callback_data: closure data for @callback * @callback_data_destroy: destroy notify for @callback_data * @@ -1126,7 +1135,7 @@ /** * dex_future_new_take_variant: (constructor) (skip) - * @v_variant: the variant to take ownership of + * @v_variant: (transfer full): the variant to take ownership of * * Creates a new #DexFuture that is resolved with @v_variant. * @@ -1194,7 +1203,7 @@ /** * dex_future_new_take_object: (constructor) - * @value: (transfer full) (type GObject): the value + * @value: (transfer full) (type GObject) (nullable): the value * * Creates a new #DexFuture that is resolved with @value. * @@ -1206,9 +1215,9 @@ GValue gvalue = G_VALUE_INIT; DexFuture *ret; - g_return_val_if_fail (G_IS_OBJECT (value), NULL); + g_return_val_if_fail (!value || G_IS_OBJECT (value), NULL); - g_value_init (&gvalue, G_OBJECT_TYPE (value)); + g_value_init (&gvalue, value ? G_OBJECT_TYPE (value) : G_TYPE_OBJECT); g_value_take_object (&gvalue, value); ret = dex_future_new_for_value (&gvalue); g_value_unset (&gvalue); @@ -1374,7 +1383,7 @@ * * Awaits on @future and returns the result as an uint. * - * The resolved value must be of type %G_TYPE_INT or @error is set. + * The resolved value must be of type %G_TYPE_UINT or @error is set. * * Returns: an uint, or 0 in case of failure and @error is set. */ @@ -1430,7 +1439,7 @@ * * Awaits on @future and returns the result as an uint64. * - * The resolved value must be of type %G_TYPE_INT64 or @error is set. + * The resolved value must be of type %G_TYPE_UINT64 or @error is set. * * Returns: an uint64, or 0 in case of failure and @error is set. */ @@ -1458,7 +1467,7 @@ * * Awaits on @future and returns the result as an double. * - * The resolved value must be of type %G_TYPE_INT or @error is set. + * The resolved value must be of type %G_TYPE_DOUBLE or @error is set. * * Returns: an double, or 0 in case of failure and @error is set. */ @@ -1486,7 +1495,7 @@ * * Awaits on @future and returns the result as an float. * - * The resolved value must be of type %G_TYPE_INT or @error is set. + * The resolved value must be of type %G_TYPE_FLOAT or @error is set. * * Returns: an float, or 0 in case of failure and @error is set. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-future.h new/libdex-0.8.0/src/dex-future.h --- old/libdex-0.6.1/src/dex-future.h 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-future.h 2024-09-16 23:59:30.000000000 +0200 @@ -296,6 +296,9 @@ # define dex_future_new_for_pointer(...) _DEX_FUTURE_NEW(new_for_pointer, __VA_ARGS__) #endif +#define dex_future_new_true() dex_future_new_for_boolean(TRUE) +#define dex_future_new_false() dex_future_new_for_boolean(FALSE) + G_DEFINE_AUTOPTR_CLEANUP_FUNC (DexFuture, dex_unref) G_END_DECLS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-gio.c new/libdex-0.8.0/src/dex-gio.c --- old/libdex-0.6.1/src/dex-gio.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-gio.c 2024-09-16 23:59:30.000000000 +0200 @@ -226,6 +226,7 @@ /** * dex_file_replace: + * @etag: (nullable) * * Returns: (transfer full): a #DexFuture */ @@ -275,6 +276,8 @@ /** * dex_input_stream_read: + * @buffer: (array length=count) (element-type guint8) (out caller-allocates) + * @count: (in) * * Returns: (transfer full): a #DexFuture */ @@ -369,6 +372,7 @@ /** * dex_output_stream_write: + * @buffer: (array length=count) (element-type guint8) * * Returns: (transfer full): a #DexFuture */ @@ -1007,7 +1011,7 @@ * @flags: flags for @message * @timeout_msec: timeout in milliseconds, or -1 for default, or %G_MAXINT * for no timeout. - * @out_serial: (out) (nullable): a location for the message serial number + * @out_serial: (out) (optional): a location for the message serial number * * Wrapper for g_dbus_connection_send_message_with_reply(). * @@ -1063,12 +1067,12 @@ /** * dex_dbus_connection_call: - * @bus_name: + * @bus_name: (nullable) * @object_path: * @interface_name: * @method_name: - * @parameters: - * @reply_type: + * @parameters: (nullable) + * @reply_type: (nullable) * @flags: * @timeout_msec: * @@ -1155,12 +1159,12 @@ /** * dex_dbus_connection_call_with_unix_fd_list: - * @bus_name: + * @bus_name: (nullable) * @object_path: * @interface_name: * @method_name: - * @parameters: - * @reply_type: + * @parameters: (nullable) + * @reply_type: (nullable) * @flags: * @timeout_msec: * @fd_list: (nullable): a #GUnixFDList diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-object.c new/libdex-0.8.0/src/dex-object.c --- old/libdex-0.6.1/src/dex-object.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-object.c 2024-09-16 23:59:30.000000000 +0200 @@ -247,7 +247,7 @@ /** * dex_weak_ref_init: (skip) - * @weak_ref: uninitialized memory to store a weak ref + * @weak_ref: (out caller-allocates): uninitialized memory to store a weak ref * @mem_block: (nullable): the mem_block weak reference * * Creates a new weak reference to @mem_block. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-object.h new/libdex-0.8.0/src/dex-object.h --- old/libdex-0.6.1/src/dex-object.h 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-object.h 2024-09-16 23:59:30.000000000 +0200 @@ -47,7 +47,7 @@ static inline void dex_clear (gpointer data) { - DexObject **objptr = data; + DexObject **objptr = (DexObject **)data; DexObject *obj = *objptr; *objptr = NULL; if (obj != NULL) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-promise.c new/libdex-0.8.0/src/dex-promise.c --- old/libdex-0.6.1/src/dex-promise.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-promise.c 2024-09-16 23:59:30.000000000 +0200 @@ -257,7 +257,7 @@ /** * dex_promise_resolve_object: * @promise: a #DexPromise - * @object: (transfer full) (nullable): a #GObject + * @object: (type GObject) (transfer full) (nullable): a #GObject * */ void @@ -269,3 +269,23 @@ dex_promise_resolve (promise, &gvalue); g_clear_object (&object); } + +/** + * dex_promise_resolve_variant: + * @promise: a #DexPromise + * @variant: (transfer full) (nullable): a #GVariant + * + * If @variant is floating, its reference is consumed. + * + * Since: 0.8 + */ +void +dex_promise_resolve_variant (DexPromise *promise, + GVariant *variant) +{ + GValue gvalue = G_VALUE_INIT; + g_value_init (&gvalue, G_TYPE_VARIANT); + g_value_take_variant (&gvalue, variant); + dex_promise_resolve (promise, &gvalue); + g_value_unset (&gvalue); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-promise.h new/libdex-0.8.0/src/dex-promise.h --- old/libdex-0.6.1/src/dex-promise.h 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-promise.h 2024-09-16 23:59:30.000000000 +0200 @@ -84,6 +84,9 @@ void dex_promise_resolve_object (DexPromise *promise, gpointer object); DEX_AVAILABLE_IN_ALL +void dex_promise_resolve_variant (DexPromise *promise, + GVariant *variant); +DEX_AVAILABLE_IN_ALL void dex_promise_reject (DexPromise *promise, GError *error); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-scheduler.c new/libdex-0.8.0/src/dex-scheduler.c --- old/libdex-0.6.1/src/dex-scheduler.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-scheduler.c 2024-09-16 23:59:30.000000000 +0200 @@ -181,20 +181,20 @@ * dex_scheduler_spawn: * @scheduler: (nullable): a #DexScheduler * @stack_size: stack size in bytes or 0 - * @func: (scope async): a #DexFiberFunc - * @func_data: (closure func): closure data for @func - * @func_data_destroy: (destroy func): closure notify for @func_data + * @func: (scope notified) (closure func_data) (destroy func_data_destroy): a #DexFiberFunc + * @func_data: closure data for @func + * @func_data_destroy: closure notify for @func_data * * Request @scheduler to spawn a #DexFiber. * - * The fiber will have it's own stack and cooperatively schedules among other + * The fiber will have its own stack and cooperatively schedules among other * fibers sharing the schaeduler. * * If @stack_size is 0, it will set to a sensible default. Otherwise, it is * rounded up to the nearest page size. * * Returns: (transfer full): a #DexFuture that will resolve or reject when - * @func completes (or it's resulting #DexFuture completes). + * @func completes (or its resulting #DexFuture completes). */ DexFuture * dex_scheduler_spawn (DexScheduler *scheduler, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-scheduler.h new/libdex-0.8.0/src/dex-scheduler.h --- old/libdex-0.6.1/src/dex-scheduler.h 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-scheduler.h 2024-09-16 23:59:30.000000000 +0200 @@ -42,7 +42,7 @@ * * This function prototype is used for spawning fibers. A fiber * is a lightweight, cooperative-multitasking feature where the - * fiber is given it's own stack. The fiber runs until it reaches + * fiber is given its own stack. The fiber runs until it reaches * a point of suspension (using `dex_await` or similar) or exits * the fiber. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-semaphore.c new/libdex-0.8.0/src/dex-semaphore.c --- old/libdex-0.6.1/src/dex-semaphore.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-semaphore.c 2024-09-16 23:59:30.000000000 +0200 @@ -47,7 +47,7 @@ /* * NOTES: * - * The DexSemaphore class works in it's ideal state by using an + * The DexSemaphore class works in its ideal state by using an * eventfd() to notify other threads of work to be done using the * EFD_SEMPAHORE eventfd type. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-timeout.c new/libdex-0.8.0/src/dex-timeout.c --- old/libdex-0.6.1/src/dex-timeout.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-timeout.c 2024-09-16 23:59:30.000000000 +0200 @@ -176,7 +176,7 @@ DexFuture * dex_timeout_new_seconds (int seconds) { - gint64 usec = G_USEC_PER_SEC * seconds; + gint64 usec = (gint64) G_USEC_PER_SEC * seconds; return dex_timeout_new_deadline (g_get_monotonic_time () + usec); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-ucontext-private.h new/libdex-0.8.0/src/dex-ucontext-private.h --- old/libdex-0.6.1/src/dex-ucontext-private.h 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-ucontext-private.h 2024-09-16 23:59:30.000000000 +0200 @@ -51,19 +51,12 @@ #endif #if defined(__APPLE__) -# include <AvailabilityMacros.h> -# if defined(MAC_OS_X_VERSION_10_5) -# if !defined(__aarch64__) -# undef USE_UCONTEXT -# define USE_UCONTEXT 0 -# endif +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE # endif #endif #if USE_UCONTEXT -# if defined(__APPLE__) && !defined(_XOPEN_SOURCE) -# define _XOPEN_SOURCE -# endif # include <ucontext.h> #endif @@ -76,22 +69,6 @@ extern void makecontext(ucontext_t*, void(*)(void), int, ...); #endif -#if defined(__APPLE__) -# if !defined(__aarch64__) -# define mcontext libthread_mcontext -# define mcontext_t libthread_mcontext_t -# define ucontext libthread_ucontext -# define ucontext_t libthread_ucontext_t -# if defined(__i386__) -# include "386-ucontext.h" -# elif defined(__x86_64__) -# include "amd64-ucontext.h" -# else -# include "power-ucontext.h" -# endif -# endif -#endif - #if defined(__OpenBSD__) # define mcontext libthread_mcontext # define mcontext_t libthread_mcontext_t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-ucontext.c new/libdex-0.8.0/src/dex-ucontext.c --- old/libdex-0.6.1/src/dex-ucontext.c 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-ucontext.c 2024-09-16 23:59:30.000000000 +0200 @@ -6,20 +6,6 @@ #include "dex-ucontext-private.h" -#if defined(__APPLE__) -# if defined(__i386__) -# define NEEDX86MAKECONTEXT -# define NEEDSWAPCONTEXT -# elif defined(__x86_64__) -# define NEEDAMD64MAKECONTEXT -# define NEEDSWAPCONTEXT -# elif defined(__aarch64__) -# else -# define NEEDPOWERMAKECONTEXT -# define NEEDSWAPCONTEXT -# endif -#endif - #if defined(__FreeBSD__) && defined(__i386__) && __FreeBSD__ < 5 # define NEEDX86MAKECONTEXT # define NEEDSWAPCONTEXT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/dex-work-stealing-queue-private.h new/libdex-0.8.0/src/dex-work-stealing-queue-private.h --- old/libdex-0.6.1/src/dex-work-stealing-queue-private.h 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/dex-work-stealing-queue-private.h 2024-09-16 23:59:30.000000000 +0200 @@ -20,7 +20,7 @@ */ /* This code is heavily based upon wsq.hpp¹ from Tsung-Wei Huang, under - * the MIT license. It's original license is provided below. + * the MIT license. Its original license is provided below. * * ¹ https://github.com/taskflow/work-stealing-queue/tree/master/wsq.hpp * @@ -80,7 +80,7 @@ { gint64 C; gint64 M; - _Atomic(DexWorkItem) S[0]; + _Atomic(DexWorkItem) S[]; } DexWorkStealingArray; typedef struct _DexWorkStealingQueue @@ -175,7 +175,7 @@ * * This adds @work_item to the queue so that it can be processed by the * local worker, or optionally, stolen by another worker after there are - * no more items to process in it's queue or the global queue. + * no more items to process in its queue or the global queue. * * This may _ONLY_ be called by the thread that owns @work_stealing_queue. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdex-0.6.1/src/meson.build new/libdex-0.8.0/src/meson.build --- old/libdex-0.6.1/src/meson.build 2024-05-30 23:43:57.000000000 +0200 +++ new/libdex-0.8.0/src/meson.build 2024-09-16 23:59:30.000000000 +0200 @@ -91,10 +91,19 @@ # Not really used on Windows now, see also # https://github.com/mesonbuild/meson/issues/4366 libdex_sources += [ - 'asm.S', 'dex-unix-signal.c', 'dex-ucontext.c', ] + + # If we're on Linux and mips we might still need asm.S. + # But otherwise linux can do it all without any custom + # assembler. Failure to do this might result in CET being + # disabled for the process by GCC. + if ((host_machine.system() != 'linux' or host_machine.cpu_family() == 'mips') and + host_machine.system() != 'darwin') + libdex_sources += ['asm.S'] + endif + libdex_headers += ['dex-unix-signal.h'] endif ++++++ libdex.obsinfo ++++++ --- /var/tmp/diff_new_pack.qntEaa/_old 2024-10-08 17:24:24.213015680 +0200 +++ /var/tmp/diff_new_pack.qntEaa/_new 2024-10-08 17:24:24.217015847 +0200 @@ -1,5 +1,5 @@ name: libdex -version: 0.6.1 -mtime: 1717105437 -commit: 76c7da206eeaf0ce9d32bde1b1b3fea5ddab27c9 +version: 0.8.0 +mtime: 1726523970 +commit: a23e48f8846e219a061ca20bf769e8cbcfd41c13
participants (1)
-
Source-Sync