[Gambas-devel] 64 bits branch merge done

Daniel Campos dcamposf at ...176...
Sun Jan 20 15:58:18 CET 2008


I was trying to get the old gb.api code from the server it is stored,
but it seems the server is down, I hope I'll can rescue it this week.
Anyway I'll take a look at libffi, I did without documentation for
poppler :-), so I suppose I'll be able to implement both structures
and callbacks with libffi provided that it supports those features :-)

2008/1/18, Benoit Minisini <gambas at ...1...>:
> On vendredi 18 janvier 2008, Benoit Minisini wrote:
> > On vendredi 18 janvier 2008, Daniel Campos wrote:
> > > > If you type "libffi" in google, the first answer is the project home
> > > > site. There is no documentation about libffi, you must look into a
> > > > sparse README file and into the source code.
> > > >
> > > > But the problem is not libffi, but Gambas there! I don't know yet how
> > > > to make support for structures and callbacks, but I will think about
> > > > it. It will need a lot of work.
> > >
> > > I already did that work for 32 bits systems, I can explore the way to
> > > do it in 64 bits if you want, btw, Is there in gcc any definition I
> > > can use to determine a 64 bits compilation?
> > >
> > > Daniel
> >
> > As for structure support, this needs big changes in the compiler, in the
> > interpreter, in the object file format, and maybe in the bytecode. There is
> > support for C-like structures in libffi, so passing them to a function will
> > not be a problem.
> >
> > As for callback support, I have no idea how you could do that correctly.
> >
> > Note that libffi uses assembly for calling functions, so that it can deal
> > with the different ABI of 64 bits systems and 32 bits systems (Hopefully,
> > there is only one ABI for 64 bits systems, but several for 32 bits
> > systems).
> >
> > And there is no support for callbacks in libffi. So please explain me how
> > you implemented them, without using assembly! :-)
> >
> > Regards,
>
> I was wrong. Apparently, there is some support for callbacks in libffi
> (named 'closures'), but I didn't find any documentation about it. Maybe by
> using the code search of Google...
>
> --
> Benoit Minisini
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>




More information about the Devel mailing list