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 endianness to int converter functions. #6901

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Add endianness to int converter functions. #6901

merged 1 commit into from
Feb 22, 2024

Conversation

vpetrovykh
Copy link
Member

Add std::Endian enum with two values big and little.

Update the bytes <-> int converter functions with a required Endian parameter.

Update the docs to reflect these changes.

@vpetrovykh vpetrovykh requested a review from msullivan February 21, 2024 17:27
@@ -270,38 +270,77 @@ std::to_bytes(s: std::str) -> std::bytes {
};


CREATE SCALAR TYPE
std::Endian EXTENDING enum<little, big>;
Copy link
Member

Choose a reason for hiding this comment

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

Should it be Little and Big?

We almost always capitalize enum values. (But not, it seems, always always.)

Add `std::Endian` enum with two values `big` and `little`.

Update the bytes <-> int converter functions with a required `Endian`
parameter.

Update the docs to reflect these changes.
@vpetrovykh vpetrovykh merged commit 5c776c3 into master Feb 22, 2024
24 checks passed
@vpetrovykh vpetrovykh deleted the endian branch February 22, 2024 18:15
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.

3 participants