Skip to content
  1. May 05, 2012
    • Liam M. Healy's avatar
      Tests for cffi-libffi working · 03297bd6
      Liam M. Healy authored
      Fix an error in the recursive call in libffi-type-pointer for
      foreign-struct-type, now parse the slot-type, which is unparsed.  This
      makes FSBV.3 and FSBV.4 succeed.  Removed quote from test FSBV.2; this
      makes FSBV.2 succeed.
      03297bd6
  2. May 04, 2012
  3. May 03, 2012
  4. May 01, 2012
    • Luís Oliveira's avatar
      Rewrite backwards-compatibility mode for bare struct types. · be626770
      Luís Oliveira authored
      * Instead of a special variable, the parsed struct type instance is now
        annotated to let the type system know whether we're dealing with
        deprecated semantics (struct type canonicalizes to :pointer) or not.
      
        This approach should hopefully be much less error-prone.
      
      * Disabled translations for bare structs.
      
      * Fixed and commented out some bogus tests.
      be626770
  5. Apr 14, 2012
  6. Feb 12, 2012
  7. Jan 10, 2012
  8. Jan 07, 2012
  9. Jan 06, 2012
  10. Oct 23, 2011
    • Liam M. Healy's avatar
      Test conversion of array of structs · 68ac7272
      Liam M. Healy authored
      Added test struct-values.translation.mem-aref.1 that creates an array
      of two struct-pairs, sets their values, then retrieves both pairs.
      This test fails: the returned first pair is actually the second, and
      the returned second pair is garbage.  Repeating the same test gives
      different garbage.
      
      (with-foreign-object (p '(:struct struct-pair) 2)
            (setf (mem-aref p '(:struct struct-pair) 0) '(1 . 2)
                  (mem-aref p '(:struct struct-pair) 1) '(3 . 4))
            (values (mem-aref p '(:struct struct-pair) 0)
                    (mem-aref p '(:struct struct-pair) 1)))
      (3 . 4)
      (213829 . 0)
      
      (with-foreign-object (p '(:struct struct-pair) 2)
            (setf (mem-aref p '(:struct struct-pair) 0) '(1 . 2)
                  (mem-aref p '(:struct struct-pair) 1) '(3 . 4))
            (values (mem-aref p '(:struct struct-pair) 0)
                    (mem-aref p '(:struct struct-pair) 1)))
      (3 . 4)
      (425347 . 0)
      68ac7272
    • Liam M. Healy's avatar
      Test foreign function calls with recursive structure by value · a227e3be
      Liam M. Healy authored
      Add definition of C functions prodsumpair and doublepairdouble that
      take, and for the latter, return, the structure struct-pair+double
      (struct_pair_double) that has a structure struct-pair (struct_pair) in
      its slot 'pr.  Two tests, fsbv.3 and fsbv.4, have been defined, and
      pass.  Fixed argument to libffi-type-pointer call in
      libffi-type-pointer :around method so that these will work.
      a227e3be
  11. Oct 22, 2011
    • Liam M. Healy's avatar
      Add struct-pair+double recursive structure translation test · 9c2774d1
      Liam M. Healy authored
      Add struct-pair+double recursive structure translation test, which
      passes when run individually in SBCL.
      9c2774d1
    • 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
  12. Oct 21, 2011
    • Liam M. Healy's avatar
      Translate structure to plist; fix to mem-ref function · 4064d278
      Liam M. Healy authored
      Define a structure struct-pair-default-translate and test
      struct-values-default.translation.mem-ref.1 to test translation from
      foreign structure to plist.  In order to make this work, rewrite
      mem-ref function to parallel exactly the mem-ref compiler macro,
      because conditionals were not correct.
      4064d278
  13. Oct 09, 2011
  14. Oct 06, 2011
  15. Sep 18, 2011
  16. Sep 11, 2011
  17. Sep 10, 2011
  18. Sep 09, 2011
  19. May 26, 2011
    • Luís Oliveira's avatar
      Workaround for foreign library loading on OSX. · 39e3e521
      Luís Oliveira authored
      As of OSX 10.6.6, loading things like CoreFoundation on something
      other than the initial thread results in a crash.
      
      Implemented workaround on SBCL based on what CCL does upstream. Other
      Lisps might benefit from similar workarounds.
      39e3e521
  20. Apr 17, 2011
  21. Jan 07, 2011
  22. Sep 19, 2010
  23. Sep 09, 2010
  24. Apr 28, 2010
  25. Apr 25, 2010
  26. Jan 01, 2010
  27. Nov 24, 2009