Template "methods".
commit39b181a885f2726e4c7c9c0b11383fc3ae9b8311
authorArtur Skawina <art.08.09@gmail.com>
Wed, 1 Feb 2012 17:49:09 +0000 (1 18:49 +0100)
committerArtur Skawina <art.08.09@gmail.com>
Wed, 1 Feb 2012 18:04:35 +0000 (1 19:04 +0100)
tree91f301e1157d03130eeac545367f8b3fb62db0cd
parente8ac1ac35516110be3bc9ca57df42ec94ee94b86
Template "methods".

This helps current GDC, as it does not inline functions from modules
other than the current one (unless you use LTO or compile all modules
together).

But the real reason for the switch is not performance, it's the fact
that some library functions documented in the GIR files are not
present in the libraries. This means that if unused methods are not
discarded then linking every program using certain modules fails.

GC-sections would also be a solution, but using templates is more
portable.

Unfortunately the D frontend does not currently allow templates that
have the same name as functions, so mixins overloading existing
methods need to be changed. Hence no girtod runtime option allowing
turning this feature on/off.
girtod.d
mixin/Clutter__MODULE.d
mixin/Gdk2_Rectangle.d
mixin/Gtk2__MODULE.d