- Documentation
- Reference manual
- Foreign Language Interface
- The Foreign Include File
- Argument Passing and Control
- Atoms and functors
- Analysing Terms via the Foreign Interface
- Constructing Terms
- Unifying data
- Convenient functions to generate Prolog exceptions
- Foreign language wrapper support functions
- Serializing and deserializing Prolog terms
- BLOBS: Using atoms to store arbitrary binary data
- Exchanging GMP numbers
- Calling Prolog from C
- Discarding Data
- String buffering
- Foreign Code and Modules
- Prolog exceptions in foreign code
- Catching Signals (Software Interrupts)
- Miscellaneous
- Errors and warnings
- Environment Control from Foreign Code
- Querying Prolog
- Registering Foreign Predicates
- Foreign Code Hooks
- Storing foreign data
- Embedding SWI-Prolog in other applications
- The Foreign Include File
- Foreign Language Interface
- Packages
- Reference manual
n
language wrapper support functions
In addition to the functions described in
section 12.4.4.2,
there is a family of functions that is used for automatic generation of
wrapper functions, for example using the Prolog library library(qpforeign)
that provides a Quintus/SICStus compatible foreign language interface.
The PL_cvt_i_*() family of functions is suitable for use with a
_Generic
selector or C++ overloading.220_Generic
needs to take into account that there's no bool
type in C
but there is in C++. An overloaded integer() method is provided in the
C++ interface.
Note that the documentation on this API is incomplete. Also note that many of these functions are equivalent to the PL_get_*_ex() functions described in section 12.4.7.
- int PL_cvt_i_bool(term_t p, int *c)
- Equivalent to PL_get_bool_ex(). Note that the