• Philip Withnall's avatar
    gtask: Ensure to return 1 or 0 from getters rather than truthy ints · ae381d79
    Philip Withnall authored
    Since commit 290bb0dd, where various members of GTask were converted to
    a bitfield, some of the getters:
     • g_task_get_check_cancellable()
     • g_task_get_return_on_cancel()
     • g_task_get_completed()
    have been returning truthy ints (zero or an arbitrary non-zero integer)
    as boolean values, rather than the canonical boolean ints of 1 and 0.
    
    This broke the `yield` statement in Vala, whose generated C code
    compares `g_task_get_completed (…) != TRUE`. i.e. Whether the
    `completed` field has a value not equal to 1.
    
    Fix this by explicitly converting truthy ints to canonical boolean ints
    in all getters.
    Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
    
    #1636
    ae381d79
Name
Last commit
Last update
.gitlab-ci Loading commit data...
build Loading commit data...
docs Loading commit data...
fuzzing Loading commit data...
gio Loading commit data...
glib Loading commit data...
gmodule Loading commit data...
gobject Loading commit data...
gthread Loading commit data...
m4macros Loading commit data...
po Loading commit data...
subprojects Loading commit data...
tests Loading commit data...
.dir-locals.el Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
HACKING Loading commit data...
INSTALL.in Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
NEWS.pre-1-3 Loading commit data...
README Loading commit data...
README.md Loading commit data...
README.rationale Loading commit data...
README.win32 Loading commit data...
acglib.m4 Loading commit data...
acinclude.m4 Loading commit data...
autogen.sh Loading commit data...
check-abis.sh Loading commit data...
configure.ac Loading commit data...
gio-2.0.pc.in Loading commit data...
gio-unix-2.0.pc.in Loading commit data...
gio-windows-2.0.pc.in Loading commit data...
glib-2.0.pc.in Loading commit data...
glib-gettextize.in Loading commit data...
glib-tap.mk Loading commit data...
glib.doap Loading commit data...
glib.mk Loading commit data...
glib.supp Loading commit data...
gmodule-2.0.pc.in Loading commit data...
gmodule-export-2.0.pc.in Loading commit data...
gmodule-no-export-2.0.pc.in Loading commit data...
gobject-2.0.pc.in Loading commit data...
gthread-2.0.pc.in Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...
msvc_recommended_pragmas.h Loading commit data...
sanity_check Loading commit data...
tap-driver.sh Loading commit data...
tap-test Loading commit data...
template-tap.test.in Loading commit data...
template.test.in Loading commit data...