You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
abi-breakbreaks the ABI (e.g. programs linked against the library have to be recompiled)api-breakbreaks the API (e.g. programs using it will have to adjust their source code)
ShouldWrite is a new thing in 2.0. It's set to a default value in each call so older code don't need to care about it if they don't want too. But it's still missing in many places.
For example in EbmlMaster::PushElement() it should not add elements that would otherwise not be written. This is also called internally in ProcessMandatory(). There's also AddNewElt() calling PushElement() so would require the same ShouldWrite usage.
Adding ShouldWrite to each call that can potentially end up with a write element is not only tedious, but it's inconsistent. If one part of the code uses one particular ShouldWrite and another uses a different one (like the default by not explicitly setting one), they might end up adding/writing elements that are not allowed by one or the other.
Using a state (SetWriteFilter, GetWriteFilter) allows consistency between the calls. The setter may refuse to set the new policy if it doesn't match the current state, or it could have a flag to force the new policy.
The text was updated successfully, but these errors were encountered:
robUx4
added
api-break
breaks the API (e.g. programs using it will have to adjust their source code)
abi-break
breaks the ABI (e.g. programs linked against the library have to be recompiled)
labels
Mar 2, 2024
abi-breakbreaks the ABI (e.g. programs linked against the library have to be recompiled)api-breakbreaks the API (e.g. programs using it will have to adjust their source code)
ShouldWrite is a new thing in 2.0. It's set to a default value in each call so older code don't need to care about it if they don't want too. But it's still missing in many places.
For example in
EbmlMaster::PushElement()
it should not add elements that would otherwise not be written. This is also called internally inProcessMandatory()
. There's alsoAddNewElt()
callingPushElement()
so would require the sameShouldWrite
usage.Adding ShouldWrite to each call that can potentially end up with a write element is not only tedious, but it's inconsistent. If one part of the code uses one particular ShouldWrite and another uses a different one (like the default by not explicitly setting one), they might end up adding/writing elements that are not allowed by one or the other.
Using a state (SetWriteFilter, GetWriteFilter) allows consistency between the calls. The setter may refuse to set the new policy if it doesn't match the current state, or it could have a flag to force the new policy.
The text was updated successfully, but these errors were encountered: