GNOME Bugzilla – Bug 787091
Vala generates invalid C code with SimpleType structures defined as arrays
Last modified: 2018-05-22 15:52:06 UTC
Created attachment 358866 [details] [review] proposed patch If the struct being moved is an array, and was declared as [SimpleType], the generated code will fail to compile with error: assignment to expression with array type This happens because the left part of the assignment is an array, and as such it's not directly modifiable. The first idea was to use a custom copy_function, but Vala ignores it in these cases. The attached patch adds handling for a copy_function with this prototype, if provided by the user: void foo_copy(foo source, foo dest); thanks to Rico Tzschichholz for wrapping up a unit test
-- 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/595.