setf mem-ref doesn't understant struct typedefs

Bug #1474921 reported by 3b
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CFFI
New
Undecided
Unassigned

Bug Description

(defcstruct a-
  (a :int))
(defctype a (:struct a-))

(with-foreign-object (b '(:struct a-))
  (setf (mem-ref b '(:struct a-)) '(a 1)))
;; OK

(with-foreign-object (b '(:struct a-))
  (setf (mem-ref b 'a) '(a 1)))
;; =>
There is no applicable method for the generic function
  #<STANDARD-GENERIC-FUNCTION
    CFFI:TRANSLATE-INTO-FOREIGN-MEMORY (10)>
when called with arguments
  ((A 1) #<CFFI::FOREIGN-TYPEDEF A>
   #.(SB-SYS:INT-SAP #X06C7FFF0))

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.