with-stack-fobject

Macro

Package: ff

Arguments: (var type &rest etc) &rest body

Allocate an object of type type on the stack and bind it to var while evaluating body. The object will be of allocation type :foreign for the purposes of accessing it with fslot-value and associated functions. The object will disappear after control leaves body thus the program must not maintain any pointers to the object past this point. Currently, if this form is evaluated by the interpreter, the object will be allocated as a :foreign object, which means it will be in the lisp heap. This may not be what you want since you may need to allocate an object that doesn't move during garbage collection. In the future, we will arrange that if stack allocation can't be done, then the object will be allocated as :foreign-static-gc.

Multiple bindings can be done with with-stack-fobjects.

See ftype.htm for information on foreign types in Allegro CL and foreign-functions.htm for general information on foreign functions in Allegro CL.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.