After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 648204 - Posix backend uses glib functions
Posix backend uses glib functions
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
: 621701 631739 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-19 12:48 UTC by pancake
Modified: 2011-12-09 10:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test program (498 bytes, text/x-vala)
2011-04-19 12:48 UTC, pancake
Details

Description pancake 2011-04-19 12:48:31 UTC
Created attachment 186276 [details]
test program

As reported in the mailing list.

the attached source generated calls to g_return_if_fail.

Use the following command to compile it:

$ valac --profile posix a.vala --pkg cairo

instead of g_return_if_fail, in posix profile it should use assert() or a #define'd version of the glib function.

the workaround is to use Context? instead of Context, so null pointer is not checked and g_return_if_fail is not called.
Comment 1 Luca Bruno 2011-04-21 10:07:58 UTC
assert() aborts the program rather than returning from the function.
Comment 2 Luca Bruno 2011-08-17 15:42:49 UTC
commit 36808eb53bbcea1a1bc035fc33245ebcb5f4130b
Author: Luca Bruno <lucabru@src.gnome.org>
Date:   Wed Aug 17 17:39:30 2011 +0200

    codegen: Skip precondition check for parameters in the posix profile
    
    Fixes bug 648204.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 3 Luca Bruno 2011-09-11 08:40:01 UTC
*** Bug 621701 has been marked as a duplicate of this bug. ***
Comment 4 Luca Bruno 2011-12-09 10:07:08 UTC
*** Bug 631739 has been marked as a duplicate of this bug. ***