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 572423 - Add c:header-filename or c:header-filenames where appropriate
Add c:header-filename or c:header-filenames where appropriate
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
2.18.x
Other All
: Normal enhancement
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks: 559704
 
 
Reported: 2009-02-19 14:57 UTC by Didier "Ptitjes"
Modified: 2015-02-07 16:55 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Bug 572423 - Support --c-include argument for specifying C headers (7.28 KB, patch)
2009-02-19 22:54 UTC, Colin Walters
accepted-commit_now Details | Review

Description Didier "Ptitjes" 2009-02-19 14:57:04 UTC
Bindings that links to shared library, needs to have the header filenames.

Exact header search path can be extracted from pkgconfig file.
Comment 1 Colin Walters 2009-02-19 15:26:08 UTC
Which header filenames?  The ones we scanned, or the ones you should include in C?  Remember that several libraries only allow you to #include one header.

What will this be used for?
Comment 2 Didier "Ptitjes" 2009-02-19 16:02:04 UTC
The ones that should be included in C. Even if there is only one header file to include, we have to know that header filename.

For instance, Valac generates C code that should include those headers.

As an example, here is a VAPI part that should be generated from gir:

[CCode (cprefix = "G", lower_case_cprefix = "g_")]
namespace GLib {
        [CCode (cheader_filename = "gio/gio.h")]
        public class AppLaunchContext : GLib.Object {
                ...

You can see that we cannot guess "gio/gio.h".
Comment 3 Colin Walters 2009-02-19 16:31:21 UTC
Ok.  So to implement this I'd suggest a new option for the scanner:

--c-include="gio/gio.h"

(May be specified multiple times).

Comment 4 Didier "Ptitjes" 2009-02-19 16:58:00 UTC
--c-include="..." sounds good to me.

Having this specified multiple times in the command line means you will generate a c:header-filenames="header1, header2, ..." on the namespace element ?
Comment 5 Colin Walters 2009-02-19 22:54:02 UTC
Created attachment 129104 [details] [review]
Bug 572423 - Support --c-include argument for specifying C headers

This option is for specifying inside the .gir what C header files should
be included by C consumers (as opposed to parsed by the scanner).
Comment 6 Johan (not receiving bugmail) Dahlin 2009-02-19 22:55:13 UTC
Comment on attachment 129104 [details] [review]
Bug 572423 - Support --c-include argument for specifying C headers

Looks pretty good.
Comment 7 Didier "Ptitjes" 2009-02-20 13:08:26 UTC
Does work correctly here. And this is exactely what we expected. Could you commit this ?
Comment 8 Colin Walters 2009-02-20 14:11:27 UTC
Still need to update gir-repository.

commit ff4628ced457a5460f854abb8cdf923cd67c4e6e
Author: Colin Walters <walters@verbum.org>
Date:   Thu Feb 19 17:52:22 2009 -0500

    Bug 572423 - Support --c-include argument for specifying C headers
    
    This option is for specifying inside the .gir what C header files should
    be included by C consumers (as opposed to parsed by the scanner).
Comment 9 André Klapper 2015-02-07 16:55:08 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]