GNOME Bugzilla – Bug 705602
scanner: Strip trailing * for element type of flat arrays
Last modified: 2018-02-08 12:23:27 UTC
Bindings that are handling output flat arrays differentiate them by looking at "is_pointer". See https://bugzilla.gnome.org/show_bug.cgi?id=704842
Created attachment 251040 [details] [review] scanner: Strip trailing * for element type of flat arrays
Review of attachment 251040 [details] [review]: ::: giscanner/maintransformer.py @@ +356,3 @@ + r = re.compile(r'[^*]\*$') + if element_type_node.ctype is not None and \ + r.search(element_type_node.ctype) is not None: element_type_node.endswith('*') ?
Created attachment 251041 [details] [review] scanner: Strip trailing * for element type of flat arrays Fix C tests code.
(In reply to comment #2) > Review of attachment 251040 [details] [review]: > > ::: giscanner/maintransformer.py > @@ +356,3 @@ > + r = re.compile(r'[^*]\*$') > + if element_type_node.ctype is not None and \ > + r.search(element_type_node.ctype) is not None: > > element_type_node.endswith('*') ? That's not the same, because that would match **, which we don't want - we're trying to match flat arrays.
Jasper, can you look at this one again?
Review of attachment 251041 [details] [review]: ::: giscanner/maintransformer.py @@ +354,3 @@ + def _maybe_strip_flat_ctype(self, element_type_node): + r = re.compile(r'[^*]\*$') I'm skeptical of this, simply because it would fail on "foo_t * *". Do we normalize ctype names?
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
-- 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/gobject-introspection/issues/90.