Name

allocate-foreign-object — Allocates an instance of a foreign object.

Macro

(allocate-foreign-object type &optional size)

type

The type of foreign object to allocate. This parameter is evaluated.

size

An optional size parameter that is evaluated. If specified, allocates and returns an array of type that is size members long. This parameter is evaluated.

returns

A pointer to the foreign object.

Description

Allocates an instance of a foreign object. It returns a pointer to the object.

Examples

(def-struct ab (a :int) (b :double))
   (allocate-foreign-object 'ab)
=> #<ptr>

Side Effects

None.

Affected by

None.

Exceptional Situations

None.