[fetter-devel] RE: Request for comments on new interface

Rayiner Hashem rayiner at gmail.com
Mon Oct 10 18:04:31 UTC 2005


> That way, VZN can see all the function declaration. (IMHO the format of dll
> export table is not too hard to parse.)
> Now what function will VZN export? It can determine what function it will
> export to wx.lisp by looking in
> wxwidgets.dll. If the function/class/type are in both wxwidgets.dll file and any .h files
> reachable from wx.h, then VZN should export it.

The problem with doing this is that the .dll or the .so doesn't
provide all of the information needed to determine what to export. It
only contains information about exported functions and variables. It
has no information on classes, structs, enumerations, #define's, etc.

Provided with no other information, Vzn only has only one choice about
what to do with any class, struct, etc, declarations: export them. So
you're back to the situation where your freeglut.lisp includes every
enumeration, struct and constant defined in windows.h. This will be a
problem in practice. The original code in Vzn that pulled preprocessor
declarations out of headers didn't subject them to the pruning pass,
and the resultant files still took several minutes to compile with
Allegro, even though the only extraneous items from windows.h were
#define constants.

So, even if you consult the .dll or .so to figure out what functions
to export, the user will still have to specify from which headers to
export all the other types of declarations, at which point you don't
need to consult the .dll.

Sincerely,
    Rayiner Hashem

>
> For issue on a function that the orignal author didn't export, there you can
> have special option to do it; may be
>
>
>  (include "wx.h" :bind :recursive :force-export ("unexported_func"
> "some_more_unexported_func"))
>
> But we should optimize for the general case.
>
> Also, to provide flexibility, we should also be able to generate a binding
> from just a header file.
>
> This is when we can fallback to the approach of manually listing all the
> header file we want the export symbol.
>
> Hope this is a sensible request.
>
>
> _______________________________________________
> fetter-devel mailing list
> fetter-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/fetter-devel
>
>
>



More information about the fetter-devel mailing list