Name

ensure-char-character — Ensures that a dereferenced :char pointer is a character.

Macro

(ensure-char-character object)

object

Either a character or a integer specifying a character code.

returns

A character.

Description

Ensures that an objects obtained by dereferencing :char and :unsigned-char pointers are a lisp character.

Examples

      (let ((fs (convert-to-foreign-string "a")))
      (prog1 
      (ensure-char-character (deref-pointer fs :char))
      (free-foreign-object fs)))
      => #\a

Side Effects

None.

Affected by

None.

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.