Skip to content
  1. Jan 29, 2017
    • Francois-Rene Rideau's avatar
      Improve c-toolchain · 1c28a961
      Francois-Rene Rideau authored and Attila Lendvai's avatar Attila Lendvai committed
      Add support for getting parameters from new SBCL sbcl.mk.
      Add support for getting parameters from CLISP makevars.
      Add support for getting parameters for ECL and MKCL.
      
      Refactor static linking to use the above.
      On SBCL, this relies on the new feature :sb-linkable-runtime
      (from 1.3.14-20-g402a8fab6).
      On ECL and MKCL, have static-{image,program}-op be pass-through synonyms
      for the usual variants.
      Remove deceitful incomplete support for static linking on CMUCL.
      
      Add shell test for static linking, to better work with SBCL (uses cl-launch).
      
      Add class c-file for C files to compile, and o-file for precompiled objects.
      They can be either dynamically loaded into the current process,
      or statically linked into a new runtime.
      
      Upgrade backward compatibility bundle from asdf 3.1.6 to 3.2.0.
      Stop manually curating a minimal set of changes,
      just adopt a new bundle.lisp wholesale.
      1c28a961
  2. Dec 19, 2015
    • Liam M. Healy's avatar
      Fix libffi with enum argument · 215ea91b
      Liam M. Healy authored
      The function #'expand-to-foreign-dyn-indirect, used by cffi-libffi, did
      not create the correct expansion when there was an enumerated argument,
      because two translations are required, one from the symbol to an
      integer, and the second to make the integer indirect, passing a pointer
      to libffi. This remedies that problem by defining a method for
      expand-to-foreign-dyn-indirect specific to foreign-enum that recursively
      calls expand-to-foreign-dyn-indirect twice. A test, fsbv.8, has been
      created.
      215ea91b
  3. Dec 02, 2015
  4. Oct 19, 2015
    • Francois-Rene Rideau's avatar
      Make CFFI-grovel play well with ASDF 3.1.6 · 2de8ece5
      Francois-Rene Rideau authored
      Move the C toolchain support to its own system cffi-toolchain.
      
      Create linkable object files and include them in output-files for
      compile-op, so that they can be found and linked by a recent-enough
      ASDF (3.1.6 or later).
      
      Allow for delivery of a system with a single static and/or dynamic
      library, and on support platform (CLISP, CMUCL, SBCL), enable delivery
      of a standalone executable that statically links required extensions.
      
      This requires a recent SBCL (will hopefully be released in 1.2.17).
      ASDF 3.1.6 is required, but backward compatibility code is
      provided at least back to ASDF 3.1.2.
      
      On BSD, use ld -r for "libraries" instead of ar and possibly libtool.
      
      When forking a Lisp to dump an image, support Quicklisp.
      
      Make CFFI-Grovel generally more robust.
      
      Document static linking operations in manual. Improve documentation.
      
      Add test for ASDF support including wrappers.
      2de8ece5
  5. Dec 06, 2014
  6. Nov 13, 2014
  7. May 14, 2012
  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. 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
  10. Jun 04, 2009
  11. Jul 28, 2008
  12. Jun 16, 2008
  13. Jun 08, 2007
    • Luís Oliveira's avatar
      Encoding support using Babel · 4f1b66c4
      Luís Oliveira authored
      - Preliminary (likely buggy) version.  Includes documentation and tests.
      - New cffi-features: big-endian and little-endian determined with CFFI
        code.
      - Needs cleaning up.
      4f1b66c4
  14. Jun 01, 2007
    • Luís Oliveira's avatar
      gmake, sparc/hppa and libraries.lisp · a84dd07a
      Luís Oliveira authored
      - cffi-tests.asd: use gmake on solaris too.
      - new cffi-features: sparc[64] and hppa[64], SCL-only.
        (updated the respective test)
      - libraries.lisp: handle ERROR instead of SIMPLE-ERROR.
      - tests/bindings.lisp: bugfix?
      
      Patch courtesy of Douglas Crosher.
      a84dd07a
  15. Oct 13, 2006
  16. Jun 07, 2006
  17. May 03, 2006
  18. Feb 27, 2006
    • Luís Oliveira's avatar
      More testing · e6cbe95d
      Luís Oliveira authored
      - Make defcfun.undefined an expected failure for SBCL on
        non linkage-table platforms.
      - New file: tests/misc.lisp.
      - Added a couple of tests for cffi-features.
      e6cbe95d
  19. Feb 23, 2006
    • Luís Oliveira's avatar
      SCL port, courtesy of Douglas Crosher · 3ce10a0c
      Luís Oliveira authored
      - Makefile: new test-scl target. Add SCL's fasl file extensions
        to the clean target.
      - Remove SCL TODO item.
      - New file: cffi-scl.lisp.
      - New primitive type :long-double. Since it's only supported by
        SCL, it's not worth adding a no-long-double feature just yet.
      - New tests for :long-double.
      - Add information about SCL and the new :long-double type to
        the user manual.
      3ce10a0c
  20. Oct 27, 2005
    • Luís Oliveira's avatar
      Updated ECL support · f5b57429
      Luís Oliveira authored
      - Updated cffi-ecl.lisp, courtesy of Michael Goffioul.
        (Includes some ECL specific workarounds in the portable
         bits of CFFI.)
      f5b57429
  21. Aug 26, 2005
    • Luís Oliveira's avatar
      Type system improvements and more. · cf0aca67
      Luís Oliveira authored
      - New tests: tests/enums.lisp (4 tests) and tests/misc-types.lisp (3 tests).
      - New file: objects.lisp, skeleton of the safe typed pointer interface. I
        also added a :boolean type here, it's looking for a better home still.
      - (early-types.lisp): type parsers, DEFINE-TYPE-SPEC-PARSER and PARSE-TYPE.
        Added abbility to have anonymous types (ie. a name is no longer required
        for FOREIGN-TYPE). Moved DEFCTYPE to types.lisp.
      - (enum.lisp): improved DEFCENUM, the values for each keyword are now
        optional, like in C. Added the anonymous type (:enum ...)
      - (types.lisp):
          - Renamed :TO-C-ARG to :TO-C-DYNAMIC.
          - Renamed FOREIGN-AREF to MEM-AREF and implemented compiler macros
            for it.
          - New exported macro: DEFINE-FOREIGN-TYPE for parameterized types.
          - Change DEFINE-TYPE-TRANSLATOR back to the previous interface,
            translators take a type argument now and we have translators
            available at runtime now too.
          - FOREIGN-TYPEDEF's now inherit their parent type's translators.
          - New :wrapper type, for anonymous typedefs with translators.
      - (strings.lisp): Renamed string to :string. Added new type, :string+ptr.
      - (utils.lisp): renamed let-if to bif.
      - (tests/callbacks.lisp): two tests were not being run for SBCL
        because I thought it triggered a bug but it's actually only one that
        triggers the bug. Fixed that.
      - Updated examples and tests to use :string instead of string.
      cf0aca67
  22. Aug 21, 2005
    • Luís Oliveira's avatar
      A couple of minor changes. · 94e36ad3
      Luís Oliveira authored
      - Move #-cffi/no-foreign-funcall from cffi-tests.asd to
        tests/funcall.lisp and have the lisps that don't support this
        push the feature in cffi-<lisp>.lisp instead of defpackage.
      - New file: utils.lisp
      - Make Allegro, CMUCL, Corman and OpenMCL use callback-symbol-name  (from cffi-utils) to safely intern callback symbol names (James)
      - Clisp: consider (pointerp NIL)
      94e36ad3
  23. Aug 05, 2005
    • Luís Oliveira's avatar
      New callback interface. · 6e8172f3
      Luís Oliveira authored
      - New interface: DEFCALLBACK, CALLBACK, GET-CALLBACK
      - New CALLBACK.* tests.
      - Implementations of CFFI-SYS:MAKE-CALLBACK:
          - Allegro, passes all tests on linux/x86 and win32
            fails CALLBACKS.CHAR/UNSIGNED-CHAR/SHORT/UNSIGNED-SHORT
            on darwin/ppc, looks like an Allegro bug.
          - clisp, passes all tests.
          - cmucl, passes all tests on linux/x86, on darwin/ppc fails
            CALLBACKS.CHAR/UNSIGNED-CHAR/SHORT/UNSIGNED-SHORT, looks
            like a bug in cmucl/ppc too.
          - sbcl, x86 only, passes all tests except its callbacks
            can't handle sap's yet, that'd be bug in sbcl too.
          - openmcl, fails CALLBACKS.FLOAT/DOUBLE, I reported this
            bug in openmcl, and it has been confirmed.
          - Lispworks, passes all tests on darwin/ppc, on linux/x86
            and win32 there are issues unrelated to callbacks.
      6e8172f3
    • Luís Oliveira's avatar
      39f0a922
  24. Aug 04, 2005
  25. Jul 11, 2005
  26. Jul 04, 2005
  27. Jun 23, 2005
  28. Jun 14, 2005
  29. Jun 11, 2005
    • Stelian Ionescu's avatar
      Add unit testing framework using RT. · b1f81eee
      Stelian Ionescu authored
      Add unit testing framework using RT.
      Lots of manual and CFFI-SYS updates.
      Add passing a double float to sprintf in examples.lisp.
      Update the syntax of the nested structure example.
      Add the INC-PTR function to the CFFI-SYS backends.
      Add the shareable byte vector interface to the CFFI-SYS backends.
      Started writing support for aggregate structure slots.  Not used yet.
      b1f81eee
  30. Jun 07, 2005