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 726744 - valac should inherit array_length and array_null_terminated from base method
valac should inherit array_length and array_null_terminated from base method
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.23.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-19 21:11 UTC by leimiao09
Modified: 2014-03-20 22:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description leimiao09 2014-03-19 21:11:25 UTC
In vapi, I have:


        [CCode (array_length = false, array_null_terminated = true)]
        public abstract unowned string[] get_protocols (GLib.Type type);

In my vala code, I have:

public unowned string[] get_protocols(Type type) { return protocols; }

In the generated c code, I expect:

static gchar**my_streaming_source_real_get_protocols (GstURIHandler* base, GType type)

However, the code generator generates:

static gchar**my_streaming_source_real_get_protocols (GstURIHandler* base, GType type, int* result_length1)
Comment 1 Luca Bruno 2014-03-20 20:23:04 UTC
I cannot reproduce the vfunc_name problem. Can you attach a test case please?
Comment 2 Luca Bruno 2014-03-20 22:19:57 UTC
commit 42393d7aacf98e0e1657aadebdc8d4961db7a447
Author: Luca Bruno <lucabru@src.gnome.org>
Date:   Thu Mar 20 20:28:33 2014 +0100

    codegen: Inherit array_length and array_null_terminated of methods
    
    Fixes bug 726744

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.

Closing in the while, feel free to open another bug about vfunc_name if there's any problem, but shouldn't with a recent vala compiler.