Skip to content

Switch compiler macros to CONSTANT-FORM-VALUE instead of CL:EVAL - #345

Open
samuel-hunter wants to merge 3 commits into
cffi:masterfrom
samuel-hunter:use-constant-form-value
Open

samuel-hunter wants to merge 3 commits into
cffi:masterfrom
samuel-hunter:use-constant-form-value

Conversation

@samuel-hunter

@samuel-hunter samuel-hunter commented Nov 8, 2022 •

Copy link
Copy Markdown
Contributor

WIP. Fixes #344.

CONSTANT-FORM-VALUE probably ought to belong in a separate package so that CFFI-SYS can access it without a circular dependency.

@samuel-hunter

Copy link
Copy Markdown
Contributor Author

All uses of CL:EVAL are switched out except for the CFFI-SYS macros in cffi-*.lisp. Two ideas I've had for moving CONSTANT-FORM-VALUE to let these macros use it as well are:

  • Create a package cffi-sys-util that both cffi-sys and cffi can import from (would exposing a new package be problematic?)
  • For each cffi-*.lisp, split them into head and tail files and have CONSTANT-FORM-VALUE loaded in-between (Prevents exposure of a new package, but doubling files here feels like a code smell here)

I'm leaning on option 1. Any thoughts?

@sionescu

sionescu commented Nov 8, 2022

Copy link
Copy Markdown
Member

8629618 refactors the package definitions and exports CONSTANT-FORM-P and CONSTANT-FORM-VALUE from CFFI-SYS.

@samuel-hunter

Copy link
Copy Markdown
Contributor Author

Switched out functions in cffi-sys. This should be ready for another round of reviews

@attila-lendvai
attila-lendvai requested a review from sionescu April 12, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch compiler macros to CONSTANT-FORM-VALUE instead of CL:EVAL.

2 participants