Skip to content

Commit 3f84516

Browse files
authored
Merge branch 'main' into refactor-v4
2 parents 0b9313b + ffbf4f8 commit 3f84516

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dissect/cstruct/cstruct.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def add_type(self, name: str, type_: MetaType, replace: bool = False) -> None:
213213

214214
self.typedefs[name] = type_
215215

216-
def load(self, definition: str, deftype: int = None, **kwargs) -> None:
216+
def load(self, definition: str, deftype: int = None, **kwargs) -> "cstruct":
217217
"""Parse structures from the given definitions using the given definition type.
218218
219219
Definitions can be parsed using different parsers. Currently, there's
@@ -237,6 +237,8 @@ def load(self, definition: str, deftype: int = None, **kwargs) -> None:
237237
elif deftype == cstruct.DEF_LEGACY:
238238
CStyleParser(self, **kwargs).parse(definition)
239239

240+
return self
241+
240242
def loadfile(self, path: str, deftype: int = None, **kwargs) -> None:
241243
"""Load structure definitions from a file.
242244

0 commit comments

Comments
 (0)