Re: up-to-date spec?



Andreas Voegele wrote:

Hi,

Does an up-to-date specification of the defs file format exist?

The latest version is always in CVS in the language-bindings module. It needs a bit of updating though (from changes mentioned on the list).



Are the caller-owns-return and can-return-null flags still used?

I never got round to annotating them in my defs files (or getting my code generator to use them). As these were suggested by Ariel, his guile code generator is probably a good example.



Are the return types "gchar*" and "const-gchar*" handled differently?

According to the spec, if no (caller-owns-return ...) line is given, a "char*" return defaults to (caller-owns-return true), while "const-char*" defaults to #f.



Is it possible to mark in, out, and inout parameters?

yes. See the "Functions and Methods" section of the spec. There is an optional third arg for a parameter definition. Eg:
 (define-function widget_push_colormap
   (in-module "Gtk")
   (c-name "gtk_widget_push_colormap")
   (parameters
     '("GdkColormap*" "cmap" "in")
   )
 )

The code generator for pygtk doesn't handle it at the moment.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/






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