-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, maps were handled in a following way: 1. `key` parsed 2. `{key: None}` stored in the resulting value --- New iteration of parsing --- 3. `value` parsed 4. `dict.popitem()` called to retrieve the parsed `key` 5. `{key: value}` stored This was hackish but worked fine with a dict. However, with a new mode of handling maps as lists of tuples, it started working incorrectly with PyPy, where assignment of `value` was always ignored. This commit introduces a new variable `pendingObject` inside `libvalkey_ReaderObject` that represents the pending key to be stored in a map item. Hence, the new way of parsing a map item is now the following: 1. `key` parsed and stored inside `self->pendingObject` --- New teration of parsing --- 2. `value` parsed 3. `key` taken from `self->pendingObject` 4. `{key: value}` stored Signed-off-by: Mikhail Koviazin <[email protected]>
- Loading branch information
Showing
2 changed files
with
41 additions
and
22 deletions.
There are no files selected for viewing
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
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