here is the way CvMemStorage is defined
typedef struct CvMemStorage { int signature; CvMemBlock* bottom; /* First allocated block. */ CvMemBlock* top; /* Current memory block - top of the stack. */ struct CvMemStorage* parent; /* We get new blocks from parent as needed. */ int block_size; /* Block size. */ int free_space; /* Remaining free space in current block. */ } CvMemStorage;
bu i get
unknown CFFI type: (:STRUCT CV-MEM-STORAGE). [Condition of type SIMPLE-ERROR]
when i wrap like this....i know lisp is known for recursion how do i bypass this
(defcstruct cv-mem-storage (signature :int) (bottom (:pointer (:struct cv-mem-block))) (top (:pointer (:struct cv-mem-block))) (parent (:pointer (:struct cv-mem-storage))) (block-size :int) (free-space :int))
On Thu, Oct 31, 2013 at 8:40 AM, Joeish W joeish80829@yahoo.com wrote:
when i wrap like this....i know lisp is known for recursion how do i bypass this (defcstruct cv-mem-storage (signature :int) (bottom (:pointer (:struct cv-mem-block)))
One work-around is to use a plain :POINTER.
HTH,
Thanks Luis I tested many different ways and your Idea worked =) I appreciate that
On Thursday, October 31, 2013 8:24 AM, Luís Oliveira loliveira@common-lisp.net wrote:
On Thu, Oct 31, 2013 at 8:40 AM, Joeish W joeish80829@yahoo.com wrote:
when i wrap like this....i know lisp is known for recursion how do i bypass this (defcstruct cv-mem-storage (signature :int) (bottom (:pointer (:struct cv-mem-block)))
One work-around is to use a plain :POINTER.
HTH,
-- Luís Oliveira http://kerno.org/~luis/