[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DSO-style FFI
From: |
Tom Tromey |
Subject: |
Re: DSO-style FFI |
Date: |
Tue, 08 Oct 2013 14:43:39 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Ted> Would any kind of FFI help with data formats? I don't think so, right?
Sure.
Basically you would need to expose "native" structures (and pointers and
whatnot) to elisp, so that elisp can manipulate their fields in various
ways. This is pretty easy to do; libffi doesn't provide code for this
specifically, but you can reuse the type descriptor stuff.
Ted> The foreign function has to take Emacs Lisp_Objects (maybe just strings
Ted> and numbers) and package its return data in a Lisp_Object. So how do we
Ted> handle that glue with libffi or anything else without promising some
Ted> minimal internal Emacs ABI?
The idea is to have the FFI code be part of Emacs. So when Emacs
changes, it does too. What doesn't change is the API presented to
elisp.
This is how FFI works in other languages -- Common Lisp, Python,
probably Guile (I didn't check), Java (it's part of reflection there),
etc.
Ted> I don't know much about libltdl but it seems fairly simple, except for
Ted> the requirement to name all exported symbols _modulename_LTX_* which is
Ted> a bit annoying.
I think that's only for preloaded modules.
Most people don't use this feature.
Tom
- Re: GNU Emacs-libnettle-libhogweed integration patch v1, (continued)
- Re: GNU Emacs-libnettle-libhogweed integration patch v1, Ted Zlatanov, 2013/10/07
- Re: GNU Emacs-libnettle-libhogweed integration patch v1, Ted Zlatanov, 2013/10/07
- Re: GNU Emacs-libnettle-libhogweed integration patch v1, Stefan Monnier, 2013/10/07
- Emacs crypto use cases (was: GNU Emacs-libnettle-libhogweed integration patch v1), Ted Zlatanov, 2013/10/07
- Re: Emacs crypto use cases, Stefan Monnier, 2013/10/07
- Re: Emacs crypto use cases, Ted Zlatanov, 2013/10/08
- Re: Emacs crypto use cases, Stephen J. Turnbull, 2013/10/08
- DSO-style FFI (was: Emacs crypto use cases), Stefan Monnier, 2013/10/08
- Re: DSO-style FFI, Tom Tromey, 2013/10/08
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/08
- Re: DSO-style FFI,
Tom Tromey <=
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/09
- Re: DSO-style FFI, Andreas Schwab, 2013/10/10
- Re: DSO-style FFI, Davis Herring, 2013/10/08
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/09
- Re: DSO-style FFI, Davis Herring, 2013/10/09
- Re: DSO-style FFI, Ted Zlatanov, 2013/10/09
- Re: DSO-style DSOs (this is NOT an FFI!), Stephen J. Turnbull, 2013/10/10
- Re: DSO-style FFI, Stephen J. Turnbull, 2013/10/08
- Re: DSO-style FFI, Stefan Monnier, 2013/10/08
- Re: DSO-style FFI, Michael Welsh Duggan, 2013/10/12