GNOME Bugzilla – Bug 707656
Pass-by-value for typedefed const pointer types?
Last modified: 2018-02-08 12:24:11 UTC
I have this: typedef const struct hb_language_impl_t *hb_language_t; The aim is for hb_language_t to be used a pass-by-value type. However, g-i doesn't recognize this and generates these kinds of warnings: /home/behdad/src/freedesktop/harfbuzz/src/hb-common.h:138: Warning: HarfBuzz: hb_language_from_string: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip) I can register it as boxed, but that would result in unnecessary copies all over.
In general, I expect that typedefs to pointer types will just be expanded and behave as if the typedef was not there.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Has this happened or otherwise changed in recent versions? I just upgrade to Ubuntu 14.04 and this works as I would expect...
-- 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/94.