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

Generated code doesn't distinguish error from EOF, for the getc callback #484

Open
katef opened this issue Jul 11, 2024 · 0 comments
Open
Labels

Comments

@katef
Copy link
Owner

katef commented Jul 11, 2024

We can do this in the caller with ferror() or setting errno = 0 or whatever. We could distinguish this in the generated code, and explicitly return a different value.

I'm not convinced I actually do want to handle this in the generated code, because it only applies to FSM_IO_GETC (you can't have a read error for any other IO API, just hit EOT). Perhaps this is the responsibility of the caller, because they provide the getc callback in the first place.

@katef katef added the bug label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant