[Cffi-devel] "The value is not of type SB-SYS:SYSTEM-AREA-POINTER." when creating 2d array

Joeish W joeish80829 at yahoo.com
Sun Apr 6 09:03:42 UTC 2014


I'm getting this this Error:

The value
  (FOREIGN-ALLOC :POINTER :INITIAL-ELEMENT
                 (POINT (UNIFORM RNG X-1 X-2)
                        (UNIFORM RNG Y-1 Y-2)))
is not of type
  SB-SYS:SYSTEM-AREA-POINTER.
   [Condition of type TYPE-ERROR]


My array is below, I simplified the array elements to (cffi:null-pointer)  I've been trying everything I can to create a 2d array of pointers. But its all  been coming down to this error: If anyone can help with this I'd be very appreciative.:)


(defvar *2d-array* #2A((


(foreign-alloc :pointer :initial-element (null-pointer))

(foreign-alloc :pointer :initial-element (null-pointer)))

((foreign-alloc :pointer :initial-element (null-pointer))

(foreign-alloc :pointer :initial-element (null-pointer)))))

(foreign-alloc :pointer
               :initial-contents (make-array (reduce #'* (array-dimensions *2d-array*))
                                             :displaced-to *2d-array*))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20140406/e8c67a14/attachment.html>


More information about the cffi-devel mailing list