LispWorks User Guide and Reference Manual > 9 The Compiler > 9.6 Optimizing your code

NextPrevUpTopContentsIndex

9.6.7 Inlining foreign slot access

Given a structure definition

(fli:define-c-struct foo-struct
  (a :int)
  (b :int))

you can inline access to a slot by declaring fli:foreign-slot-value inline and supplying the object-type :

(defun foo-a (struct)
  (declare (inline fli:foreign-slot-value))
  (fli:foreign-slot-value struct 'a :object-type 'foo-struct))

LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex