Package: graphene
Macro graphene:with-object
Lambda Listgraphene:with-object ((var type &rest args) &body body) SyntaxArgumentsDetails The graphene:with-object macro allocates an new Graphene instance
for the given Graphene type, initializes the Graphene instance with given
values and executes the body that uses the Graphene instance.
After execution of the body the allocated memory for the Graphene instance
is released. The type argument can have one of the following values to create and initialize a corresponding Graphene instance:
Examples* (macroexpand '(graphene:with-object (p graphene:point-t) p)) (LET ((P (GRAPHENE:POINT-ALLOC))) (GRAPHENE:POINT-INIT P 0.0 0.0) (UNWIND-PROTECT (PROGN P) (GRAPHENE:POINT-FREE P))) TInitialize a graphene:with-point instance with two values: * (macroexpand '(graphene:with-object (p graphene:point-t 1 2) p)) (LET ((P (GRAPHENE:POINT-ALLOC))) (GRAPHENE:POINT-INIT P 1 2) (UNWIND-PROTECT (PROGN P) (GRAPHENE:POINT-FREE P))) T | See also |
2025-4-7