define-struct



I have cobbled together a struct definition extractor since I was tiring of hardcoding struct defs for Gtk#. It doesn't yet deal with embedded unions or structures, but then again, neither does the defs spec. :-) It also barfs on non-typedef'd function pointer fields. (/me checks his defs spec for function pointers). There's only one structure that does this in the gdk headers though, so perhaps that's an oversite that I can clean and try to sneak past the API freeze police.

The script and a set of defs for the gdk structures can be found in mono cvs in the codegen directory of the gtk-sharp module. The defs file has a few hand edits to work around the union and function pointer things. I also have a script that generates signal and property defs from source, although I understand those have been handled elsewhere already. My props extractor embraces and extends the defs format by adding a (doc-string "...") expression to the def. This is so trivial to extract that it could probably be added to the spec at this point.

Mike






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]