Thank you Daniel, I will try SWIG first.

Cheers

2009/3/5 Daniel Ehrenberg <[email protected]>

> No, there's no tool like that. Such a tool would be a lot of work,
> since it would involve implementing a C header parser and preprocessor
> in the general case. This has been done in the SWIG project, I think,
> but no one has done this for Factor's FFI. It looks like it'd be
> possible to bind to SWIG and use its header parser, actually.
>
> Dan
>
> On Wed, Mar 4, 2009 at 2:31 AM, Caesar Hu <[email protected]> wrote:
> > Hi, all
> >
> > I'm study C library interface, viewing cairo/ffi.factor, then I have a
> > question:
> >
> > Is there a tool to convert *.h to ffi.factor, like :
> >
> > cairo.h:
> > typedef struct _cairo_matrix {
> >     double xx; double yx;
> >     double xy; double yy;
> >     double x0; double y0;
> > } cairo_matrix_t;
> >
> > cairo/ffi.factor:
> > C-STRUCT: cairo_matrix_t
> >     { "double" "xx" }
> >     { "double" "yx" }
> >     { "double" "xy" }
> >     { "double" "yy" }
> >     { "double" "x0" }
> >     { "double" "y0" } ;
> >
> > If there is a  tool to convert *.h to ffi.factor, we can binding C
> library
> > easily.
> >
> >
> ------------------------------------------------------------------------------
> > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> > -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> > -Strategies to boost innovation and cut costs with open source
> participation
> > -Receive a $600 discount off the registration fee with the source code:
> SFAD
> > http://p.sf.net/sfu/XcvMzF8H
> > _______________________________________________
> > Factor-talk mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/factor-talk
> >
> >
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the
> Enterprise
> -Strategies to boost innovation and cut costs with open source
> participation
> -Receive a $600 discount off the registration fee with the source code:
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to