Skip to content
  1. Feb 25, 2013
  2. Feb 23, 2013
  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. Feb 12, 2012
  6. 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
  7. Oct 22, 2011
  8. 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
  9. Oct 09, 2011
  10. Oct 06, 2011
  11. Sep 18, 2011
  12. Sep 11, 2011
  13. Sep 10, 2011
  14. Jul 30, 2007
  15. Jul 19, 2007
  16. Feb 14, 2007
    • Luís Oliveira's avatar
      stdcall, namespaces, close-foreign-library · 4f37c6d9
      Luís Oliveira authored
      Three new features:
        - stdcall (defcfun, foreign-funcall(-pointer), defcallback)
        - namespaces, associate foreigns vars and functions to a
          specific library. (CLISP and Lispworks only)
        - close-foreign-library actually works now.
      
      Backwards incompatible changes:
        - define-foreign-library's syntax changed slightly, can't
          load more than one foreign library per define-foreign-library
          form anymore.
        - defcvar's syntax changed.
        - foreign-funcall can't funcall pointers anymore. Use
          foreign-funcall-pointer for that.
      4f37c6d9
  17. Sep 05, 2006
  18. May 03, 2006
  19. Jan 25, 2006
    • Luís Oliveira's avatar
      more doc changes; renamed features · 059b9a3a
      Luís Oliveira authored
      - change "docs" to be the default target in doc/Makefile.
      - add Stephen the list of authors in cffi-manual
      - rename "Index" to "Comprehensive Index" so that Index.html doesn't
        clash with index.html on OSX.
      - add varargs example for defcfun
      - rename features (again) foreign-funcall -> no-foreign-funcall,
        long-long -> no-long-long.
      059b9a3a
  20. Jan 07, 2006
    • Luís Oliveira's avatar
      Pushing cffi-features symbols to *features* · 9ac097e9
      Luís Oliveira authored
      - Renamed :cffi/no-foreign-funcall and :cffi/no-long-long to
        cffi-features:foreign-funcall and cffi-features:long-long respectively
        (with the opposite meanings of course).
      - Also new features (in the cffi-features package): darwin, unix, windows,
        ppc32 and x86. More could be added. The cffi-sys backends are
        responsible for pushing these features.
      9ac097e9
  21. Dec 30, 2005
  22. Dec 28, 2005
  23. Dec 27, 2005
  24. Dec 21, 2005
  25. Dec 12, 2005
    • Luís Oliveira's avatar
      Bug fixes · dc4219cd
      Luís Oliveira authored
      - WITH-FOREIGN-OBJECT should eval the type parameter. Fixed this
        as well as the examples and tests that assumed it wasn't evaluated.
      - document WITH-FOREIGN-OBJECT in the manual.
      - removed the pseudo ability to specialize arguments on
        define-type-translator. That didn't quite work, doh.
      - removed dead code from cffi-uffi-compat::foreign-type-size
        specialized on the uffi-array-type.
      - uffi-compat: parse (:array <type>) as (:array <type> 1)
      - uffi-compat: reflect the fact that CFFI:WITH-FOREIGN-OBJECT now
        evaluates the type parameter.
      dc4219cd
  26. Dec 05, 2005
    • Luís Oliveira's avatar
      Apply translations for simple slots. · 622d97a2
      Luís Oliveira authored
      - Make the foreign-slot-value method on simple-struct-slot apply the
        adequate type translator. Same thing for the setter.
      - Test this in STRUCT.STRING.1 and STRUCT.STRING.2
      622d97a2
  27. Nov 14, 2005
    • Luís Oliveira's avatar
      darwin/ppc32 ABI structure alignment · 7160f706
      Luís Oliveira authored
      - Normalize the different implementation features (:powerpc, :macos,
        :macosx32) into :ppc32 and :darwin.
      - Force Allegro, CLISP, Lispworks, SBCLto return 8 as :double's
        alignment on darwin/ppc32
      - Correctly calculate alignments for darwin/ppc32's strange ABI.
      - New tests: STRUCT.ALIGNMENT.[567].
      7160f706
  28. Sep 25, 2005
    • Luís Oliveira's avatar
      Fixed bogus getters in setf expanders. · 6aed9901
      Luís Oliveira authored
      Bug report and initial bugfixes courtesy of Marco Gidde.
      
      - fixed setf expanders for mem-ref, mem-aref, and foreign-slot-value.
        (also mem-aref was evaluating the type argument twice)
      - likewise fixed cmucl's, openmcl's and sbcl's setf expanders for %mem-ref.
      - regression tests: mem-aref.eval-type-x2, mem-ref.nested, mem-aref.nested
        and struct.nested-setf.
      6aed9901
  29. Sep 15, 2005
    • Luís Oliveira's avatar
      Removed test, tweaked tests/Makefile · 062a6f93
      Luís Oliveira authored
      - Commented out the test STRUCT.ALIGNMENT.5 because an empty struct is
        not valid standard C and some compilers, namely VC++, won't compile it.
      - Add -ansi -pedantic to the compiler flags to catch things like this
        sooner next time.
      062a6f93
  30. Sep 07, 2005
  31. Sep 02, 2005
    • Luís Oliveira's avatar
      Fix struct bug, defcvar bug and tweaked bindings.lisp · 4f04606d
      Luís Oliveira authored
      - defcvar now works (more) correctly with aggregate types.
      - struct types now carry alignment information which is now
        correctly calculated (for unions too) according to the x86
        ABI (tested on darwin/ppc too, but should study other ABI
        docs at some point).
      - also tail padding is now correctly added to structs, when
        necessary. (also according to the x86 ABI).
      - 4 new tests for this struct bug (reported by Wilco Greven).
      - tweaked tests/bindings.lisp to correctly load the library on
        Lispworks and to make it more portable across win/nix/etc..
      4f04606d
  32. Jun 07, 2005