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

add stdbool foreign type #873

Merged
merged 1 commit into from
Sep 29, 2024
Merged

add stdbool foreign type #873

merged 1 commit into from
Sep 29, 2024

Conversation

mflatt
Copy link
Contributor

@mflatt mflatt commented Sep 20, 2024

As suggested in #869.

The stdbool type corresponds to bool as defined by the host machine's "stdbool.h", which is 1 byte for all currently supported platforms. That's different than boolean, which instead reflects a traditional C encoding of booleans as int, which is 4 bytes for all currently supported platforms.

The "stdbool.h" header is standard as of C99, while Chez Scheme's implementation generally sticks to C89. But the header needed only for a test file, and it tends to be available in C89 enviornments, too.

Copy link
Contributor

@jltaylor-us jltaylor-us left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok to me, but I only understand about half of it.

release_notes/release_notes.stex Outdated Show resolved Hide resolved
s/cmacros.ss Outdated Show resolved Hide resolved
The `stdbool` type corresponds to `bool` as defined by the host
machine's "stdbool.h", which is 1 byte for all currently supported
platforms. That's different than `boolean`, which instead reflects a
traditional C encoding of booleans as `int`, which is 4 bytes for all
currently supported platforms.

The "stdbool.h" header is standard as of C99, while Chez Scheme's
implementation generally sticks to C89. But the header needed only for
a test file, and it tends to be available in C89 enviornments, too.
@mflatt mflatt merged commit eebce9b into cisco:main Sep 29, 2024
15 checks passed
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