pygtk snapshot using new defs format



I converted pygtk over to the new (v3) defs format over the weekend.  You
can get a tarball at:
  http://www.gnome.org/~james/pygtk2-SNAP-20010708.tar.gz

The h2def.py script included in the tarball should now generate v3 defs
files.  However, it isn't perfect and has some limitations :)

- Currently it can only extract object, enum, flags, method and function
  definitions.
- It doesn't extract interface definitions, and doesn't add (implements
  ...) lines to object definitions (I don't think there is any way to tell
  what interfaces an object implements just from the headers).
- It doesn't extract boxed definitions.
- It doesn't add (fields ...) lines for object or boxed types.
- It doesn't identify which functions are constructors for an object type.
- It doesn't add (null-ok) or (default "...") to function/method
  parameters.
- It doesn't add (caller-owns-return ...) or (can-return-null ...) lines
  to function and method definitions.
- It doesn't output signal or property definitions (we really need to
  generate and run a small program to do this).

Some of these limitations could probably be fixed pretty easily, but
others would be quite difficult to do.  For now, I distribute defs files
that have been modified after generation with pygtk.

In CVS there is a small defsconvert.py script (not in the tarball), which
can update v2 defs to v3.  It will probably only correctly handle defs
files that matched the style of the output of my h2def.py script (ie. it
doesn't use a full s-expression parser -- I wanted to preserve comments,
etc when converting my defs files to the new format).

As for the defs specification, I noticed a few typos in the last draft,
and noticed that there is nothing in the spec to say whether a function is
a C varargs function.

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]