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

Guarantee null-termination for strings. #2316

Merged
merged 4 commits into from
May 17, 2024

Conversation

floitsch
Copy link
Member

No description provided.

@floitsch floitsch requested a review from kasperl May 16, 2024 15:38
@cla-bot cla-bot bot added the cla-signed The contributors have signed the CLA label May 16, 2024
Copy link
Member

@kasperl kasperl left a comment

Choose a reason for hiding this comment

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

Looks good to me.

bytes = message as ByteArray
if message is string:
// By taking a copy we ensure that we don't have to worry about string slices.
return (message as string).copy
Copy link
Member

Choose a reason for hiding this comment

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

We can easily handle slices in the messaging code if we want to.

Copy link
Member

@kasperl kasperl left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@kasperl kasperl merged commit 7a71d2d into master May 17, 2024
25 checks passed
@kasperl kasperl deleted the floitsch/external.40.guarantee-strings branch May 17, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The contributors have signed the CLA
Development

Successfully merging this pull request may close these issues.

None yet

2 participants