diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-29 00:24:00 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-29 00:24:00 +0200 |
commit | 60a9fac8d4ae4da1676a639fac01389df48e4d60 (patch) | |
tree | ede730008e0075931fbd1e083b48b4a65471d18a /unix/main.c | |
parent | 7f11c794a53b78dc90d924b8c44e6d8165d5b4af (diff) | |
download | micropython-60a9fac8d4ae4da1676a639fac01389df48e4d60.tar.gz micropython-60a9fac8d4ae4da1676a639fac01389df48e4d60.zip |
unix: Initial implementation of FFI module.
Foreign Function Interface module allows to load native dynamic libraries,
call functions and access variables in them. This makes possible to write
interface modules in pure Python.
This module provides thin wrapper around libffi. ctypes compatibility might
be possible to implement on top of this module (though ctypes allow to call
functions without prototypes, which is not supported by libffi (i.e.
implementation would be inefficient))).
Diffstat (limited to 'unix/main.c')
-rw-r--r-- | unix/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/unix/main.c b/unix/main.c index 212bbe877e..69bac044f7 100644 --- a/unix/main.c +++ b/unix/main.c @@ -24,6 +24,7 @@ extern const mp_obj_fun_native_t mp_builtin_open_obj; void file_init(); void rawsocket_init(); +void ffi_init(); static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind, bool is_repl) { if (lex == NULL) { @@ -227,6 +228,7 @@ int main(int argc, char **argv) { file_init(); rawsocket_init(); + ffi_init(); // Here is some example code to create a class and instance of that class. // First is the Python, then the C code. |