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

meta: const string implementation #1318

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

jpeletier
Copy link
Contributor

Note: Includes #1313, so that the tests would pass. It might make sense to review and merge that one first.

This PR implements an opaque type to represent read-only const strings stored in .rodata, so that the automatic destructor I am working on to fix #1215 ignores them, since no destructor is specified for this opaque type.

The PR also maps build_info_t's reflection definition to use these const strings.

In conjunction with #1316, const strings are then more or less transparent from the reflection/cursor point of view. A cursor can read a const string, but won't be able to write to it, since it does not implement assign_string overload.

@jpeletier jpeletier force-pushed the const-string branch 6 times, most recently from 06274ac to 08646c4 Compare August 22, 2024 16:17
@SanderMertens
Copy link
Owner

Thanks for the PR!

@SanderMertens SanderMertens merged commit 20ce9b3 into SanderMertens:master Aug 24, 2024
70 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.

Strings not freed on runtime components
2 participants