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 650200 - Fix symbols being reported in invalid files.
Fix symbols being reported in invalid files.
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-05-14 19:54 UTC by Stef Walter
Modified: 2015-02-07 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for review (17.33 KB, patch)
2011-05-14 19:57 UTC, Stef Walter
none Details | Review
Updated patch rebased on master. (17.58 KB, patch)
2011-06-16 08:49 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2011-05-14 19:54:10 UTC
Due to the way that flex/bison works, the symbols are not added to the scanner immediately. Additional lines can be parsed through bison, after a symbol is parsed but before its added to the scanner.

If these lines are #line directives, then scanner->current_filename can change between when the symbol is parsed and when it's added.

Change so that symbol gets filename when parsing rather than when being added to the scanner.
Comment 1 Stef Walter 2011-05-14 19:57:57 UTC
Created attachment 187825 [details] [review]
Patch for review

The branch this patch is based on is here: http://cgit.collabora.co.uk/git/user/stefw/gobject-introspection.git/log/?h=correct-macro-source-file
Comment 2 Stef Walter 2011-05-14 20:00:22 UTC
BTW, this caused other problems. I'm trying to add introspection to libgcr (in gnome-keyring) and various #define symbols from C files were showing up as warning messages:

gcr-importer.h:117: Warning: Gcr: symbol='BLOCK': Unknown namespace for symbol 'BLOCK'

The symbol is actually on line 117 of gcr-importer.c [1]. Since g-ir-scanner uses the suffix (.c vs .h) to determine whether a symbol is public, the filename affects more than just cosmetic output.

[1] http://git.gnome.org/browse/gnome-keyring/tree/gcr/gcr-importer.c#n117
Comment 3 Stef Walter 2011-06-16 08:49:56 UTC
Created attachment 190019 [details] [review]
Updated patch rebased on master.

Branch here: http://cgit.collabora.com/git/user/stefw/gobject-introspection.git/log/?h=correct-macro-source-file
Comment 4 Colin Walters 2011-08-10 14:43:47 UTC

*** This bug has been marked as a duplicate of bug 629757 ***
Comment 5 André Klapper 2015-02-07 16:49:42 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]