Add compiler macro FOREIGN-TYPE-SIZE
commitaf33f6e3a6b97fadf95c9e8fc4005a17a9d6581b
authorSamuel Hunter <samuel@shunter.xyz>
Tue, 8 Nov 2022 00:25:53 +0000 (7 16:25 -0800)
committerStelian Ionescu <sionescu@cddr.org>
Tue, 8 Nov 2022 19:33:24 +0000 (8 14:33 -0500)
tree9ea8dc8f759ccc13db82d8e74f695d4ea0f60edf
parentd4216a3acafa6c8630d314224d8c988bf670bc15
Add compiler macro FOREIGN-TYPE-SIZE

The compiler macro is a first-pass that should fix most use cases
without breakage. It checks to see if the foreign type is constant, and
if so, expands into its foreign type size, falling back to the old form
if an error is signaled.

Close #343
src/early-types.lisp
tests/misc.lisp