Name

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

Syntax

	  ensure-char-character object => char
	

Arguments and Values

object

Either a character or a integer specifying a character code.

char

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.