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 648973 - Add --disable-typedef to valac
Add --disable-typedef to valac
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator: GType
0.12.x
Other All
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-29 18:58 UTC by Martin Nordholts
Modified: 2018-05-22 14:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-valac-Add-disable-typedef.patch (6.57 KB, patch)
2011-04-29 18:58 UTC, Martin Nordholts
none Details | Review
0001-valac-Add-disable-typedef.patch (6.79 KB, patch)
2011-05-01 10:14 UTC, Martin Nordholts
none Details | Review

Description Martin Nordholts 2011-04-29 18:58:21 UTC
Created attachment 186899 [details] [review]
0001-valac-Add-disable-typedef.patch

To support gtype instance struct types on the form

  typedef struct _SomeClass SomeClass;

to be declared in a file other than the C header file for a class, add
a --disable-typedef option to valac.

Things still don't quite work as I want, but it would be nice to get a "we're never going to accept this patch" or a "we'll probably include that patch when you've fixed all important problems with it".
Comment 1 Jürg Billeter 2011-04-29 19:08:16 UTC
It would help if you explained why or in what situation you'd like to use this. I can understand that C libraries may want a separate -types.h file with all the typedefs in addition to the per-class header files to, e.g., avoid header cycles. However, as Vala generates a single header file for the whole library, I don't really see the point in such a separate typedef header file.
Comment 2 Martin Nordholts 2011-05-01 08:39:22 UTC
My particular use case is to use Vala for core GIMP classes, which currently is pure GObject C.

For example, I'd like to be able to use Vala to generate http://git.gnome.org/browse/gimp/tree/app/core/gimptag.h, which has the instance struct typedeffed in http://git.gnome.org/browse/gimp/tree/app/core/core-types.h#n164
Comment 3 Martin Nordholts 2011-05-01 10:14:54 UTC
Created attachment 186965 [details] [review]
0001-valac-Add-disable-typedef.patch

Only apply the new option to header files.

This patch doesn't to me have any known problems.
Comment 4 GNOME Infrastructure Team 2018-05-22 14:02:01 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/vala/issues/197.