Yes, the reordering can be much manual work.

For the gintro module, I do it automatically now, but it takes a few minutes to 
finish -- and it is based on gobject-introspection.

The ugly way is to put all types into a single type section at the front of the 
module. Many modules from early days like the gtk2 ones do that. But of course 
that is mud mixing, the resulting module is very unfriendly for the human 
observer. Someone recommended in the past to ship one mudmixed module for the 
compiler and one virgin one for humans. You may do that.

Or, you may ask Araq for the pragma name which allows forward declarations. I 
tested it one year ago, it was working fine indeed. But was not really 
advertised or recommended. Or, you may wait -- future compiler versions may 
support forward declarations out of the box. 

Reply via email to