Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/libfsm/print/c.c: Add opaque argument to generated DFA functions. #465

Merged
merged 1 commit into from
May 8, 2024

Conversation

silentbicycle
Copy link
Collaborator

The generated functions for FSM_IO_STR and FSM_IO_PAIR didn't include a void *opaque to pass other state, so add it. For example, this could be used to pass info about which endids matched.

The generated functions for FSM_IO_STR and FSM_IO_PAIR didn't include
a `void *opaque` to pass other state, so add it. For example, this could
be used to pass info about which endids matched.
@silentbicycle silentbicycle requested a review from katef May 7, 2024 21:24
@katef katef merged commit 25659c2 into main May 8, 2024
322 checks passed
@katef katef deleted the sv/add-extra-opaque-arg-to-c-dfa-codegen-in-IO-STR branch May 8, 2024 11:37
silentbicycle added a commit that referenced this pull request May 31, 2024
This is a follow-up to #465:

- Also add the extra `void *opaque` to vmc's codegen.

- Add a `(void)` cast to suppress warnings if the extra opaque
  void pointer isn't used by the generated code.
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.

2 participants