Name
ensure-char-integer — Ensures that a dereferenced :char
pointer is
an integer.
Macro
Syntax
ensure-char-integer
object
=> int
Arguments and Values
object
Either a character or a integer specifying a character code.
- int
An integer.
Description
Ensures that an object obtained by dereferencing a
:char
pointer is an integer.
Examples
(let ((fs (convert-to-foreign-string "a")))
(prog1
(ensure-char-integer (deref-pointer fs :char))
(free-foreign-object fs)))
=> 96
Exceptional Situations
Depending upon the implementation and what UFFI expects, this
macro may signal an error if the object is not a character or
integer.