mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-26 16:30:17 +00:00
m1n1.constructutils: Optionally do not recurse through pointers
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
203c0135e7
commit
1fcfa3d0e3
1 changed files with 7 additions and 0 deletions
|
@ -358,6 +358,13 @@ class ROPointer(Pointer):
|
|||
def _build(self, obj, stream, context, path):
|
||||
return obj
|
||||
|
||||
def _parse(self, stream, context, path):
|
||||
recurse = getattr(stream, "recurse", False)
|
||||
if not recurse:
|
||||
return None
|
||||
|
||||
return Pointer._parse(self, stream, context, path)
|
||||
|
||||
class ConstructClass(ConstructClassBase, Container):
|
||||
""" Offers two benifits over regular construct
|
||||
|
||||
|
|
Loading…
Reference in a new issue