- 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
strong>(term_t
p, uint32_t *c)
int PL_cvt_i_int64(term_t
p, int64_t *c)
int PL_cvt_i_uint64(term_t
p, uint64_t *c)
int PL_cvt_i_size_t(term_t
p, size_t *c) Convert a Prolog integer into a C integer of the specified size.
Generate an exception and return
FALSE
if the conversion is
impossible because the Prolog term is not an integer or the C type
cannot represent the value of the Prolog integer.
12.4.8 Serializing and deserializing Prolog terms
- int PL_put_term_from_chars(term_t t, int flags, size_t len, const char *s)
- Parse the text from the C-string s holding len bytes and put the resulting term in t. len c