Skip to content

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

Merged
guelfey merged 1 commit intomasterfrom
fix/prop_pointers
Feb 13, 2022
Merged

prop: copy initial values and store as pointers internally#310
guelfey merged 1 commit intomasterfrom
fix/prop_pointers

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