- Feb 03, 2022
-
-
MrLightningBolt authored
This allows the groveler to correctly handle cstruct definitions that include arrays
-
- Dec 13, 2021
-
-
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
-
- Aug 19, 2021
-
-
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.
-
- Apr 03, 2021
-
-
Luís Oliveira authored
This reverts commit b3e6b3f2. Osicat fails to compile. lp#1922428
-
- Mar 29, 2021
-
- Oct 15, 2020
-
-
This includes size, ssize, ptrdiff, offset, intptr, and uintptr
-
- May 13, 2020
-
-
Luís Oliveira authored
-
Luís Oliveira authored
-
Luís Oliveira authored
-
Luís Oliveira authored
-
- May 12, 2020
-
-
Luís Oliveira authored
This reverts commit c5d140fe.
-
- May 11, 2020
-
-
Luís Oliveira authored
-
- May 04, 2020
-
-
Shinmera authored
This is useful for very large enumerations of which we're only interested in a subset, or enumerations that allow for arbitrary client or vendor extensions that we cannot be aware of. Erroring on a value that we ostensibly do not care about in such a situation is not desirable, and instead simply passing through the integer allows handling the interesting cases easily in a CASE or something similar.
-
- Feb 26, 2020
-
-
Madhu authored
CFFI now always translates aggregate struct values to lisp property lists. Earlier struct values which were defined by types introduced by defctype were translated as foreign pointers. One consequence of this change is that defcvar to a foreign struct will always produce an immutable lisp list. To modify the struct the user first has to get at the pointer to the struct via FORIEGN-SYMBOL-VALUE or GET-VAR-POINTER. To modify nested structs the user has to get at the pointer to the field via FORIEGN-SLOT-POINTER, - or use the the (:POINTER VAR) syntax of WITH-FOREIGN-SLOTS. * src/early-types.lisp: (defctype): use translatable-foreign-type instead of enhanced-foreign-type. * tests/structs.lisp: New tests: (misnamed) STRUCT-VALUES.FSBV.1 STRUCT-VALUES.FSBV.1 Updated tests: STRUCT.ALIGNMENT.1 STRUCT.ALIGNMENT.2 STRUCT.ALIGNMENT.3 STRUCT.ALIGNMENT.4 STRUCT.ALIGNMENT.5 STRUCT.ALIGNMENT.6 STRUCT.ALIGNMENT.7 STRUCT.NESTED-SETF STRUCT.ALIGNMENT.8
-
- Jan 24, 2020
-
-
Stas Boukarev authored
-
- Oct 20, 2018
-
-
Luís Oliveira authored
-
- Jan 03, 2018
-
-
Michał Herda authored
Rename test ARRAY.ROUND-TRIP to ARRAY.FOREIGN-TO-LISP.BASIC Add test ARRAY.FOREIGN-TO-LISP.ADJUSTABLE Add test ARRAY.FOREIGN-TO-LISP.DISPLACED Add test ARRAY.FOREIGN-TO-LISP.SPECIALIZED Implementation detail for test ARRAY.FOREIGN-TO-LISP.SPECIALIZED: 15.1.2.2 of the Holy Standard states that the only truly portable array specializations are for bits (bit-vectors) and characters (strings). Since char-codes are implementation-dependent, it would be tricky to write a portable test for them without generating characters at runtime. So, for a truly portable test, we are only left with bits, which are luckily numeric, and equal to (UNSIGNED-BYTE 1). This is why this test is so terribly wasteful, spending a whole byte for a single bit - CFFI has no capabilities for dealing with single bits, and this test is only meant to check correctness of the :ELEMENT-TYPE argument to MAKE-ARRAY. In actual use cases of specialized FOREIGN-ARRAY-TO-LISP, capable implementations will be able to make specialized arrays of types that are commonly optimized for and/or representable in hardware, such as (UNSIGNED-BYTE 8) on x86 architectures. Implements lp bug #1740800.
-
- Oct 05, 2017
-
-
enum: even if it's just a cosmetic difference between :int and :uint in ECL for inline calls it does matter - and another-boolean enum is of type :uint (no negative values). foreign-alloc.10: foreign-free may return no values, wrap result in (values #0). unlock callback.bff.* tests for ECL which doesn't choke on them as was suggested in the comments. add defcfun.varargs.nostdlib and funcall.varargs.nostdlib tests. They use variadic function defined in libtest.c (hence - not declared anywhere) `sum_double_arbitrary'. `sprintf' is a good vararg function example, but if implementation (like ECL) has it the declaration already included, it may lead some tests to pass which wouldn't otherwise (and vice-versa) for static ffi.
-
This function takes variable number of arguments and we have abstraction for that.
-
- Oct 03, 2017
-
-
Luís Oliveira authored
... and avoid catching non-simple-errors coming from %LOAD-FOREIGN-LIBRARY since those are unexpected and we're specifically set up to report SIMPLE-ERRORs. Fixes lp#1720626.
-
- Jan 29, 2017
-
-
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.
-
- Feb 24, 2016
-
-
Attila Lendvai authored
-
Attila Lendvai authored
-
Attila Lendvai authored
-
- Feb 02, 2016
-
-
Luís Oliveira authored
E.g., ONE is defined as a constant in a DEFBITFIELD so it can't be used as an argument name in CHECK-ENUMS.
-
Attila Lendvai authored
-
- Jan 29, 2016
-
-
Luís Oliveira authored
-
- Jan 28, 2016
-
-
Attila Lendvai authored
-
Attila Lendvai authored
-
Attila Lendvai authored
INCOMPATIBLE CHANGE: bitfields in FOREIGN-BITFIELD-SYMBOLS were treating (field 0) entries as a valid bitfield member. This commit changes that, the zero'th bit is a mask of 1, so 0 entries will not treated as bitfields entries (only mere enum entries).
-
Attila Lendvai authored
-
Attila Lendvai authored
-
Attila Lendvai authored
Once fixed, also added follow-typedefs into their accessors. NOTE: the new ENSURE-PARSED-BASE-TYPE function is more premissive than PARSE-TYPE because it doesn't error on already parsed types. This shouldn't be a problem, but there might be some assumptions i'm not aware of.
-
- Jan 07, 2016
-
-
Liam M. Healy authored
In translate-objects-ret for cffi-libffi, dereference the pointer returned from the foreign function first, then call translate-objects. This fixes an error reported by Attila Lendvai in e54b7abb when typedef is used. Test he contributed (now called fsbv.return-value-typedef) now passes.
-
- Jan 06, 2016
-
-
Attila Lendvai authored
-
- Dec 26, 2015
-
-
Attila Lendvai authored
-
- Dec 23, 2015
-
-
Attila Lendvai authored
Also added a new failing test called fsbv.wfo
-
Attila Lendvai authored
-
- Dec 19, 2015
-
-
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.
-
- Dec 02, 2015
-
-