Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
48 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters