vala-gen-introspect fail to parse header files with #line directives correctly
Submitted by Varga Dániel
Link to original bug (#638056)
Description
Created attachment 177076 very minimal example to demonstrate the problem
Header files generated by other apps usually have #line directives, but vala-gen-introspect fails to parse them correctly. It does not detect symbols because g_igenerator_add_symbol only add symbols from the "main" header files. Beacuse of the #line directive symbols seems to be in an other usually not even c header file. First the preprocesszor process all the headers, after that we can't say the difference between that #line directives exsited in the headers and the added directives, so we have to do something before preprocess:
- remove all #line directive from the input header files
- scan header files for line directives and add them to a whitelist, so we accept their symbols.
I also attached a very minimal example to demonstrate the problem.
Attachment 177076, "very minimal example to demonstrate the problem":
vala-gen-introspect.tar.bz2