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

prop: copy initial values and store as pointers internally #310

Merged
merged 1 commit into from
Feb 13, 2022

Conversation

guelfey
Copy link
Member

@guelfey guelfey commented Feb 13, 2022

Without using pointers internally, accepting structs using Store
wouldn't work properly. This requires making a copy of the initial
values (which were documented already as "initial" values, but were
indeed just reused by the existing code). But using them directly was
anyway not possible since access not going through Get or GetMust could
have led to race conditions anyway.

Fixes #298.

@guelfey guelfey self-assigned this Feb 13, 2022
Without using pointers internally, accepting structs using Store
wouldn't work properly. This requires making a copy of the initial
values (which were documented already as "initial" values, but were
indeed just reused by the existing code). But using them directly was
anyway not possible since access not going through Get or GetMust could
have led to race conditions anyway.

Fixes #298.
@guelfey guelfey merged commit b357b44 into master Feb 13, 2022
@guelfey guelfey deleted the fix/prop_pointers branch February 13, 2022 19:26
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.

Calling prop.Properties.Set changes the type of value to a pointer
1 participant