-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/db-io.lisp: Provide some syntax checking in encode-ffi-field
Under some build configurations, after processing OS header files in some host environments, ffigen5 may produce field information having non-positive offset and/or width properties, in some specific fields. This changeset provides a rudimentary parse-time syntax check for such data, implemented here in `encode-ffi-field'. On encountering a negative offset or width for a field, the type check will signal a continuable error of type `simple-type-definition-error'. The continuation form would throw to the symbol, `ignore-type', with no values. Furthermore, if encountering a zero width for a field, tentatively the updated `encode-ffi-field' would produce a warning condition of type `simple-type-definition-warning' This also updates the following functions, to gracefully handle the catch symbol `ignore-type', such that may be thrown from the updated `encode-ffi-field' * save-ffi-objc-message * db-write-byte-list * save-ffi-function * save-ffi-typedef * save-ffi-struct * save-ffi-union * save-ffi-transparent-union * db-define-var * save-ffi-objc-class The following condition classes are added, each in a tentative definition, such as to be used in this simple type checking for ffigen data, in `encode-ffi-field' * simple-type-definition-error * simple-type-definition-warning This patch was originally developed circa October, 2019 The patch has been tested, to a limited extent, under a Debian 10 amd64 installation.
- Loading branch information
Showing
1 changed file
with
75 additions
and
39 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