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 567732 - Support for immutable data type pointers
Support for immutable data type pointers
Status: RESOLVED DUPLICATE of bug 539703
Product: vala
Classification: Core
Component: Basic Types
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-14 11:08 UTC by pancake
Modified: 2009-01-16 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description pancake 2009-01-14 11:08:40 UTC
Vala needs a way to specify immutable pointers that should be directly mapped into C with the 'const' attribute.

It was discussed in the IRC to use the 'immutable' attribute from the Vala side. Here's an example:

Vala code: immutable uint8 *ptr;
C code: const unsigned char *ptr;

Actually gcc show warnings when trying to cast a const pointer to a non-const one. It is harmless, unless you try to write something there...but vala should take care about this kind of access types.
Comment 1 Andreas Brauchli 2009-01-16 16:08:20 UTC
duplicate of bug 539703 (which specifies immutable as an attribute while here it's a modifier. i'd personally prefer this one here)
Comment 2 Jürg Billeter 2009-01-16 16:12:47 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


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