Hi,

  The manual should probably note that recursive definitions don't work.
E.g. in this code:   (the structure is part of 'chromium')
--------------------------------------------------------------------
(define-foreign-record (SPU "struct _SPUSTRUCT")
  [(const c-string) name] [(const c-string) super_name]
  [(const int) id]
  [integer spu_flags]    ;; mutable, but take care!
;  [(const SPU) superSPU]
;  [(const (c-pointer (struct "_SPUSTRUCT"))) superSPU]
  [c-pointer privatePtr] ;; likewise
  )

(define SPU-superSPU
  (foreign-primitive SPU ([SPU spu]) "return(spu->superSPU);") )
--------------------------------------------------------
..neither of the commented-out versions of the field for 'superSPU' don't 
work (in the sense that I get garbage when I call SPU-superSPU -- unless I
use the foreign-primitive version).

cheers,
Daniel





_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to