Skip to content
  1. Feb 03, 2022
  2. Jan 31, 2022
  3. Jan 07, 2022
  4. Jan 03, 2022
  5. Dec 13, 2021
    • Stelian Ionescu's avatar
      Switch to lispci/cl-travis · 384d96bd
      Stelian Ionescu authored
       * build all branches
       * test more implementations (but only SBCL and CCL are mandatory)
       * libffi-dev is now installed by cl-travis
       * disable TEST-STATIC-PROGRAM because it fails due to sbcl.o not being
      build with -fPIE
       * print unexpected failures at the end of the test run
      384d96bd
  6. Dec 08, 2021
  7. Dec 05, 2021
  8. Dec 01, 2021
  9. Sep 22, 2021
  10. Aug 19, 2021
    • stacksmith's avatar
      Allow local names in WITH-FOREIGN-SLOTS · 743a9025
      stacksmith authored
      It remains compatible with existing code, but accepts additional formats for bindings:
      1) (name slot-name) - just like WITH-SLOTS;
      2) (name :pointer slot-name) - a pointer version.
      743a9025
  11. May 15, 2021
    • jathd's avatar
      Signal an error when a foreign function is not found on ABCL · 6b1e0f45
      jathd authored
      When a foreign function is not found by find-foreign-function (either because
      the function doesn't exist, or because the library is not loaded), nil is
      returned, so %%foreign-funcall is called with nil as a function, which
      ultimately leads to a null-pointer exception.
      
      Better to signal an error on the lisp side.
      6b1e0f45
  12. Apr 14, 2021
  13. Apr 03, 2021
  14. Mar 29, 2021
  15. Feb 27, 2021
  16. Feb 01, 2021
    • Stuart Dilts's avatar
      Fix discard-docstring · 7c68cafa
      Stuart Dilts authored
      defun-like semantics were meant for defcallback, but it's no longer used there.
      
      This allows for empty structure/union definitions, e.g. (defcstruct foo "empty").
      7c68cafa
  17. Jan 21, 2021
  18. Jan 01, 2021
  19. Dec 30, 2020
  20. Oct 15, 2020
  21. Sep 20, 2020
    • Luís Oliveira's avatar
      uffi-compat: convert UFFI types at macro-expansion time if possible · f97a471c
      Luís Oliveira authored
      Converting types at runtime thwarts all of CFFI's compiler
      macros. CFFI-UFFI-COMPAT:ALLOCATE-FOREIGN-OBJECT already did this;
      propagate the same approach to other similar places.
      f97a471c
    • Luís Oliveira's avatar
      Optimise CHECK-FOR-TYPEDEF-CYCLES · 7b3f5217
      Luís Oliveira authored
      Use a list rather than a hash-table to keep track of types
      seen. Although this pessimizes the time complexity of this algorithm
      from O(n) to O(n^2), using an hash-table only becomes faster once we
      reach n=250 and using a list reduces consing by an order of magnitude.
      
      For the common case where the typedef chain is only one or two types
      long, using a list is also one or two orders of magnitude faster.
      
      This makes slow code paths that call PARSE-TYPE at runtime a bit less
      painful.
      
      Benchmark:
      
      (defun make-typedef-chain (size)
        (if (zerop size)
            :int
            (eval `(cffi:defctype ,(make-symbol (format nil "TYPEDEF-~a" size))
                                  ,(make-typedef-chain (1- size))))))
      
      (let ((chain (cffi::parse-type (make-typedef-chain 2))))
        (funcall
         (compile nil (lambda ()
                        (time (loop repeat 100
                                    do (cffi::check-for-typedef-cycles chain)))))))
      7b3f5217
  22. Sep 12, 2020
  23. Aug 10, 2020
    • Luís Oliveira's avatar
      sbcl: fix callback calling conventions · c3eba9ce
      Luís Oliveira authored
      Previously assumed the presence of the :ALIEN-CALLBACK-CONVENTIONS
      feature which was only ever present in the Anton Kovalenko's
      sbcl-win32-threads fork.
      
      Fixes lp issue #1890671 reported by Matthew Stickney.
      c3eba9ce
  24. Jul 08, 2020
  25. Jul 04, 2020
  26. Jun 22, 2020
  27. Jun 02, 2020
    • Mark's avatar
      abcl: implement MAKE-SHAREABLE-BYTE-VECTOR · 47136ad9
      Mark authored
      In abcl-1.7.0, CL:MAKE-ARRAY is able create and share malloc()d memory
      for java.nio.ByteVector allocated by JNA via use of the :NIO-BUFFER
      argument. Whether this feature is present in the current
      implementation is conditionalized on the presence :NIO in
      CL:*FEATURES*.
      
      We retain the old behavior of copying memory for
      WITH-POINTER-TO-VECTOR-DATA when passed a non-shareable byte vector as
      a plausible fallback strategy.
      47136ad9
  28. May 28, 2020
  29. May 27, 2020
    • Luís Oliveira's avatar
      Add Launchpad link to README.md · c28c7606
      Luís Oliveira authored
      c28c7606
    • Florian Margaine's avatar
      Do not ignore cflags of c-file (#161) · 27201c5c
      Florian Margaine authored
      For example:
      
      ```lisp
      (defsystem "foo"
        :components ((:c-file "foo" :cflags ("-lz" "-lm"))))
      ```
      
      The slot is already there, but isn't actually used. It's useful when
      custom compilation options need to be passed.
      
      Additionally, the cflags slot is removed from o-file, as it does not
      make sense there. Nor is it used, anyway.
      27201c5c
  30. May 26, 2020
  31. May 18, 2020
    • Stelian Ionescu's avatar
      Detect statically linked libraries and avoid loading · fed34b0e
      Stelian Ionescu authored
      * add option :CANARY to DEFINE-FOREIGN-LIBRARY: a foreign symbol unique
      to the library
      
      If that symbol is found in the current image before
      the first attempt to load the library, the latter is assumed to be
      statically linked and LOAD-FOREIGN-LIBRARY only marks the load state
      as :STATIC before returning.
      
      * add new slot LOAD-STATE which, together with HANDLE, tracks the
      library
      
      | library state     | LOAD-STATE | HANDLE  |
      |-------------------|------------|---------|
      | not loaded        | NIL        | NIL     |
      | statically linked | :STATIC    | NIL     |
      | dlopen()'d        | :EXTERNAL  | non-NIL |
      fed34b0e
  32. May 17, 2020
  33. May 13, 2020