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 534781 - Return structs via out parameter
Return structs via out parameter
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Structs
0.3.x
Other All
: High minor
: 1.0
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks: 534756
 
 
Reported: 2008-05-25 16:01 UTC by Jürg Billeter
Modified: 2009-09-15 08:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jürg Billeter 2008-05-25 16:01:25 UTC
Non-simple structs are not returned via return value in C, the usual way is to use an output parameter. We should support this without an explicit out parameter in Vala.

    MyStruct get_my_struct ();

should become

    void get_my_struct (MyStruct *result);
Comment 1 Jürg Billeter 2009-09-15 08:09:40 UTC
commit 6a51c4b9bc3f731749b517a67eca5b1a2b03e3b0
Author: Jürg Billeter <j@bitron.ch>
Date:   Tue Sep 15 10:06:45 2009 +0200

    Return structs via out parameter
    
    Fixes bug 534781.