Re: Cooperating on .defs API specifications



On 31/03/2004 3:52 AM, Andreas Rottmann wrote:

Why not have .defs files, and generate the binary info from them? The
.defs files are already there, and they contain more information than
the headers do (well, comment parsing might change that, but you could
create comments from the .defs files :)). Just an idea...
For simple cases, the defs files contain enough information. For the more complex cases, they lack some information that would be needed for full introspection. Some examples are:

   * what types do (GList *) arguments and return values hold?  How
     should a binding release a (GList *) return value? (in various
     parts of GTK and Gnome, the answer is "free all members then the
     list", "free the list" and "do nothing")
   * Some functions take an array and a length arguments.  It would be
     good to link these together (for most languages, we should be able
     to omit the length arguments, since their list/array types know
     their length).
   * Is an (int *) argument an array of ints being passed in, an array
     of ints that will be modified (inout), or a pointer to a single
     int being used as an out argument?

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]