[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FFI
From: |
Zajcev Evgeny |
Subject: |
Re: FFI |
Date: |
Sun, 18 Apr 2010 22:53:57 +0400 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) SXEmacs/22.1.11 (darwin) |
Florian Weimer <address@hidden> writes:
> * Juri Linkov:
>
>> If using its implementation in GNU Emacs is not possible due to legal
>> reasons, then maybe at least it would be a good idea to implement
>> FFI in GNU Emacs compatible with SXEmacs. In this case all existing
>> library bindings will be readily available for GNU Emacs.
>
> This is only true if Emacs also implements all SXEmacs types, so it is
> a bit more ambitious than just implementing the FFI.
I think I can port SXEmacsen FFI to GNU Emacs with small blood.
SXEmacsen FFI does not uses lisp types (it does actually, but this is
another question), so you can create almost any data accessible from
FFI with only numbers, floats and strings. Let me show live example:
(setq db (sqlite-open "~/mtest.db"))
==> #<ffiobject type=pointer size=4 fotype=0 foptr=0xb6a6600>
(sqlite-execute db "CREATE TABLE PARAMS
(NAME VARCHAR(256) NULL, VALUE VARCHAR(1024) NULL)")
==> t
(sqlite-execute db "INSERT INTO PARAMS (NAME,VALUE)
VALUES (?, ?)" '("nthoteh" "HRCHRCCR"))
==> t
(sqlite-rows db "select * from params")
==> (("nthoteh" "HRCHRCCR"))
(sqlite-close db)
==> 0
As you can see there are only strings, and numbers (boolean type is
done via dinamic type/value translators implemented in ffi)
thanks
--
lg
- Embedding SQLite, Florian Weimer, 2010/04/17
- Re: Embedding SQLite, Deniz Dogan, 2010/04/17
- Re: Embedding SQLite, John Wiegley, 2010/04/17
- Re: Embedding SQLite, Juanma Barranquero, 2010/04/17
- Re: Embedding SQLite, tomas, 2010/04/18
- Re: Embedding SQLite, joakim, 2010/04/18
- FFI (was: Embedding SQLite), Juri Linkov, 2010/04/18
- Re: FFI, Florian Weimer, 2010/04/18
- Re: FFI,
Zajcev Evgeny <=
- Re: FFI, Florian Weimer, 2010/04/18
- Re: FFI, Zajcev Evgeny, 2010/04/19
- telepathy (was: FFI), Michael Albinus, 2010/04/19
- Re: telepathy, Zajcev Evgeny, 2010/04/19
- Re: telepathy, Michael Albinus, 2010/04/19
- Re: telepathy (was: FFI), Jan Moringen, 2010/04/19
- Re: telepathy, Michael Albinus, 2010/04/20
- Re: telepathy, Jan Moringen, 2010/04/20
- Re: telepathy, Zajcev Evgeny, 2010/04/20
- Re: FFI, joakim, 2010/04/19