Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
vala
vala
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 701
    • Issues 701
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 38
    • Merge Requests 38
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GNOME
  • valavala
  • Issues
  • #914

Closed
Open
Opened Feb 25, 2020 by Rico Tzschichholz@ricotzMaintainer

Initializer of array-fields in structs missing value for _*_size_

Array-fields in struct have an addtional _*_size_ field if they have a length.

struct Foo {
	public unowned string[] array;
	public int i;
}

translates to

typedef struct _Foo Foo;
struct _Foo {
	gchar** array;
	gint array_length1;
	gint _array_size_;
	gint i;
};

Now this _*_size_ field gets omitted when using a struct initializer like:

const string[] SARRAY = { "foo", "bar" };
const Foo FOO = { SARRAY, 23 };

translates to:

const gchar* SARRAY[2] = {"foo", "bar"};
const Foo FOO = {SARRAY, G_N_ELEMENTS (SARRAY), 23};

and should be:

const gchar* SARRAY[2] = {"foo", "bar"};
const Foo FOO = {SARRAY, G_N_ELEMENTS (SARRAY), G_N_ELEMENTS (SARRAY), 23};
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
0.48
Milestone
0.48
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/vala#914