# Tcl cffi package
The Tcl `cffi` package permits calling C functions in shared libraries
from within Tcl scripts via either the `libffi` or `dyncall` open source libraries.
Source repository:
https://github.com/apnadkarni/tcl-cffi.
Documentation:
https://cffi.magicsplat.com.
Some additional tutorial material is available at
https://www.magicsplat.com/blog/tags/cffi/
Source distributions and binary packages for some platforms can be
downloaded from
https://sourceforge.net/projects/magicsplat/files/cffi.
## About the package
Major features of the package are
- Implicit conversions of numerics, strings, structs and arrays
- Safety mechanisms for pointers
- Encoding of string values passed and returned from C functions
- Exception generation based on C function return values
- Proc-like argument processing with defaults, error messages etc.
- Utilities for managing memory and conversion to native formats
- Extensible type aliases and enums
- Introspection
Limitations in the current version include
- No support for *asynchronous* callbacks
## Changes in 1.2.0
- New `Struct` methods `tonative!`, `setnative!`, `getnative!`, `getnativefields` to access structures via unsafe pointers.
- Type alias for C99 `bool`
- Miscellaneous bug fixes. See
https://github.com/apnadkarni/tcl-cffi/milestone/12?closed=1
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)