[Github-comments] [geany] Gi sci methods (#935)

Thomas Martitz notifications at xxxxx
Sun Mar 6 15:32:31 UTC 2016


Am 06.03.2016 um 16:14 schrieb Colomban Wendling:
>
> I don't like the idea of generating a source file to create alias 
> symbols, just because the GIR generator tool can't be properly told to 
> put those as methods of the object.
>
> Can't you, instead of actually adding the symbols, trick the tool to 
> understand what you want? Basically, rename the symbols it parses, and 
> then fix them back in the output so they refer the actual name.
>
> Maybe something roughly around those lines:
>
> TEMP_HEADER=geany-gtkdoc-sciobjected.h
>
> sed's/sci_/scintilla_object_/'  geany-gtkdoc.h>  $TEMP_HEADER
> g-ir-scanner ...$TEMP_HEADER
> sed's/cname="scintilla_object_/cname="sci_/'  -i Geany-1.0.gir

I'd like to treat the .gir like a black box as far as possible because 
the format is not documented or stable, subject to change at any time. I 
don't consider the extra symbols to be that much of a problem to start 
processing the .gir.

I also don't want to lose access to the actual sci_* functions.

 > Do you really need another tool to parse the C code? Isn't the 
Doxygen stuff enough, as it's already used to generate some C header?

Might be doable with the doxygen too.  The problem with a doxygen-based 
solution is that the doxygen output is generated after lingeany is 
built, basically too late to add symbols to it.

Also, pycparser was quicker for me since the release is so soon.

If we can agree on shipping the symbols then I'd suggest to actually 
ship the .c file and deal with how to generate after the release (I'm 
not sure I'll manage to bring a doxygen-based solution in time).

Best regards.


---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/935#issuecomment-192914969
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160306/95c8101d/attachment.html>


More information about the Github-comments mailing list