A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/tromey/emacs-ffi below:

GitHub - tromey/emacs-ffi: FFI for Emacs

This is an FFI for Emacs. It is based on libffi and relies on the dynamic modules work (available on the Emacs 25 branch) in order to be loaded into Emacs. It is relatively full-featured, but for the time being low-level.

I'd appreciate your feedback, either via email or issues on github.

Currently the library supports primitive and structure types for arguments and return types.

Primitive types are described using keywords:

Structure types are represented by a user-pointer object that wraps an ffi_type. The best way to manipulate structures is to use define-ffi-struct, which is a limited form of cl-defstruct that works on foreign objects directly.

A structure object is also represented by a user-pointer object. If a function's return type is a structure type, then the object allocated by the FFI will automatically be reclaimed by the garbage collector -- there is no need to explicitly free it. (Contrast this with the behavior of ffi-make-c-string, which requires an explicit free.)

Currently all type conversions work the same in both directions.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4