Lisp HUG Maillist Archive

Passing parameters as const?

I have a function that accepts a pointer to a struct as a const.

The FLI definition for the parameter looks like this: (:pointer (:const
rmvertex3-d))))

Is there some defined way of passing a struct that I create using
allocate-foreign-object to the C function as a const? 

Thanks,
-Luke


Re: Passing parameters as const?

Luke J Crook <luke <at> balooga.com> writes:

> 
> I have a function that accepts a pointer to a struct as a const.
> 
> The FLI definition for the parameter looks like this: (:pointer (:const
> rmvertex3-d))))
> 

Again, I posted too soon. I need to allocate the structure as a constant like so:

(fli:allocate-foreign-object :type '(:const rm::rmcolor4-d)))

-Luke


Updated at: 2020-12-10 08:50 UTC