CFFI Package

Difference between version 2 and 4 - Previous - Next
The `cffi` package is an extension that implements a Foreign Function Interface for Tcl.
It is based on the `dyncall` library available from

The repository for the package is at
Current release is 1.0a5.
Current version as of 2021-09-13 is 1.0a7.
Documentation pages are at Source distributions and binary packages for some platforms are at Distinguishing features of the package are
* Automatic conversion of numerics, strings, structures and arrays to and from the corresponding Tcl script values * Safety mechanisms to protect against pointer errors like double frees, mismatched types * Support for automatic encoding of string values passed and returned from C functions * Exception generation based on error annotations * Proc-like argument processing with defaults, error messages etc. * Utilities for managing memory and conversion to native formats * Extensible type aliases for common system definitions * Introspection Limitations (as of 1.0 Alpha 5) include * No support for arrays of non-scalars * No support of functions taking variable number of arguments * No support for callbacks from C code * No support for passing structs by value
***See also***|%Driving Libzip with CFFI%|%
<<categories>> Foreign Interfaces