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 707656 - Pass-by-value for typedefed const pointer types?
Pass-by-value for typedefed const pointer types?
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: g-ir-scanner
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-09-06 20:56 UTC by Behdad Esfahbod
Modified: 2018-02-08 12:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Behdad Esfahbod 2013-09-06 20:56:04 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.
Comment 1 Behdad Esfahbod 2013-09-06 20:56:33 UTC
In general, I expect that typedefs to pointer types will just be expanded and behave as if the typedef was not there.
Comment 2 André Klapper 2015-02-07 17:16:01 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]
Comment 3 Behdad Esfahbod 2015-05-20 00:42:21 UTC
Has this happened or otherwise changed in recent versions?  I just upgrade to Ubuntu 14.04 and this works as I would expect...
Comment 4 GNOME Infrastructure Team 2018-02-08 12:24:11 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/gobject-introspection/issues/94.