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 622708 - unowned string array treated as char**
unowned string array treated as char**
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
: 643015 652310 (view as bug list)
Depends on:
Blocks: 688447
 
 
Reported: 2010-06-25 10:03 UTC by Mikkel Kamstrup Erlandsen
Modified: 2018-05-22 13:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mikkel Kamstrup Erlandsen 2010-06-25 10:03:28 UTC
The following program produces compile time warnings from gcc:

namespace Test
{
	public static int main (string[] args)
	{
		unowned string[] dirs = Environment.get_system_data_dirs();
		
		return 0;
	}
}

Gives:

  foo.vala.c: In function ‘test_main’:
  foo.vala.c:25: warning: assignment from incompatible pointer type

And indeed on line 25 of the generated C it assigns a const char** to a char**.

The VAPI appears to be correct as it declares this function as

  public static unowned string[] get_system_data_dirs ();
Comment 1 Michael 'Mickey' Lauer 2018-02-26 09:50:01 UTC
*** Bug 643015 has been marked as a duplicate of this bug. ***
Comment 2 Michael 'Mickey' Lauer 2018-02-26 09:50:25 UTC
*** Bug 652310 has been marked as a duplicate of this bug. ***
Comment 3 GNOME Infrastructure Team 2018-05-22 13:39:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/113.