Skip to content
  1. Apr 03, 2013
  2. Jan 18, 2013
  3. Mar 18, 2012
  4. Feb 05, 2012
  5. Feb 04, 2012
    • Liam M. Healy's avatar
      Use hash table for libffi-type-pointer · 95052e59
      Liam M. Healy authored
      Use hash table for libffi-type-pointer instead of a class slot, and
      simplify #'libffi-type-pointer methods.  Remove obsolete package
      definition file.  Tests in cffi-tests not run due to error in load,
      but GSLL tests pass.
      95052e59
  6. Jan 13, 2012
  7. Nov 25, 2011
  8. Oct 22, 2011
    • Liam M. Healy's avatar
      Tests for CFFI-FSBV libffi; fix return value translation in ffcall-body-libffi · b41e37be
      Liam M. Healy authored
      Tests fsbv.1 and fsbv.2 added that test foreign structure call and
      return by value.  This includes the C file and addition to makefile to
      generate the appropriate library, libfsbv.  So that the tests are
      properly defined, load cffi-fsbv and then cffi-tests.  Both tests
      should pass.  The test returning a structure, fsbv.2, exposed an error
      in the form generated by ffcall-body-libffi; because it always
      generated a mem-aref on the return value, the subsequent
      translate-from-foreign was effectively making a double translation.
      Thus, this form generation has been conditionalized so that if
      translate-from-foreign will not be applied (e.g., built-in-type) to
      call mem-aref, otherwise just return the pointer.
      b41e37be
  9. Sep 11, 2011
    • Liam M. Healy's avatar
      Define structure interface to libffi · f5469081
      Liam M. Healy authored
      Generic function translate-into-foreign-memory and funtion
      convert-into-foreign-memory definitions now loaded by cffi.  System
      cffi-fsbv defined for calling functions with foreign structures by
      value using libffi.  Current state of this system is to make
      libffi-type-pointer and associate with the structure in defcstruct.
      This works on test structure
      (macroexpand '(defcstruct (complex :class complex-type) (real :double) (imag :double)))
      but nothing further is done with the libffi-type-pointer.
      
      To do: fix lookup-type so that if there is no type defined, it returns
      nil.  Do iterate-foreign-structure in advance of macro expansion in
      cstruct-libffi-hook, if any arguments lack type translation, then
      return nil.  This means that that structure can not be passed/returned
      by value.  Then load cif after cstruct.  Secondary bug fix: defsynonym
      'unsigned to something, not sure what it's supposed to be; :uint?
      f5469081