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 588104 - array_length_type ignored for properties
array_length_type ignored for properties
Status: RESOLVED DUPLICATE of bug 529866
Product: vala
Classification: Core
Component: general
0.7.x
Other Linux
: Normal minor
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-08 19:01 UTC by Evan Nemerson
Modified: 2009-08-12 19:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Evan Nemerson 2009-07-08 19:01:49 UTC
The array_length_type CCode attribute seems to be ignored for properties. A good example is GLib.ByteArray.data:

[CCode (array_length_cname = "len", array_length_type = "guint")]
public uint8[] data;

Unfortunately, data.length is still treated as an int. There is some more background information in bug #586162
Comment 1 Jim Nelson 2009-08-03 18:09:13 UTC
Another example is KeyFile.get_keys().  g_key_file_get_keys returns an array length as gsize, which means the variable size differs depending on the target platform.  However, valac is always generating C code with an int, a problem on 64-bit platforms.
Comment 2 Evan Nemerson 2009-08-12 19:50:14 UTC

*** This bug has been marked as a duplicate of 529866 ***