Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@rurik-supermassive
Copy link

Similar to Transformed._build, it now correctly returns the output of its subcon build.

Before this commit using Restreamed would fail when accessing the context as in the following example:

RestreamedPassthrough = lambda subcon: Restreamed(subcon, lambda b: b, 1, lambda b: b, 1, lambda n: n)

x = Struct(a=RestreamedPassthrough(Const(1, Byte)), b=Rebuild(Byte, this.a))
x.build({})

In the Rebuild context a was not populated and was None. With this fix it is correctly populated with the built context of the sub-construct.

Similar to `Transformed._build`, it now correctly returns the output of its `subcon` build.

Before this commit using `Restreamed` would fail when accessing the context as in the
following example:

```python
RestreamedPassthrough = lambda subcon: Restreamed(subcon, lambda b: b, 1, lambda b: b, 1, lambda n: n)

x = Struct(a=RestreamedPassthrough(Const(1, Byte)), b=Rebuild(Byte, this.a))
x.build({})
```

In the `Rebuild` context `a` was not populated and was `None`. With this fix it is correctly
populated with the built context of the sub-construct.
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.