-
Notifications
You must be signed in to change notification settings - Fork 6
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
Alyapunov/cleanup and impovement #93
Open
alyapunov
wants to merge
6
commits into
master
Choose a base branch
from
alyapunov/cleanup-and-impovement
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There were 3 assert that assured that read and write data are of non-zero size. Actually there were no harm in it. More important is that in mpp code writing and reading of zero-size strings must be a valid case. So just remove asserts and add a test of ecoding/descoding of an empty string.
They are unused after switch to new codec.
Originally there were two families: compact and bitmask. In order not to be confused compact was placed in 'compact' namespace. Since family bitmask was removed in the previous commit, there's no more need in compact namespace.
It was completely outdated in the part about decoding.
Previously encode/decode expected the first argument (cont) to be tnt::Buffer of something with the same API. This commit introduces contaier adapter, so it is allowed now to encode to standard contiguous container (std::vector etc) and encode/decode just by pointer to data. Fix decode headers while we are here.
alyapunov
force-pushed
the
alyapunov/cleanup-and-impovement
branch
from
July 16, 2024 15:08
492ecfd
to
a4574ef
Compare
I can't catch what to do with failing and hung testing jobs. |
Resolver is a class that was designed for one purpose: find a reference to subobject in the list of arguments by integer path to that subobject. It also can transform objects which have decoding rules to that rules and also dereference pointers to members (which are usually used in decoding rules). The previous resolver had at a problem: it did not transform an object to its decoding rule if the object was produced by dereferencing pointer to member. Also there were circumstances when result of resolving was unwrapped - that means that specificators like as_map were lost. The patch fixes the problems and also seems to simplify resolver. Now resolver always returns completely transformed result. More comments are added. Add a test that would fail without the fix. Simplify the test a bit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
mpp: implement container adapter
Previously encode/decode expected the first argument (cont) to
be tnt::Buffer of something with the same API.
This commit introduces contaier adapter, so it is allowed now to
encode to standard contiguous container (std::vector etc) and
encode/decode just by pointer to data.
Fix decode headers while we are here.
Fix README.md.
Make some other simplifications and improvements.