Guest User

Untitled

a guest
Sep 13th, 2019
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.41 KB | None | 0 0
  1. type
  2.   DefaultBigEndian* = ref object
  3.     one*: uint32
  4.     root*: ref DefaultBigEndian
  5.     parent*: ref RootObj
  6.  
  7. proc read*(_: typedesc[DefaultBigEndian], stream: KaitaiStream, root: ref DefaultBigEndian, parent: ref RootObj): owned DefaultBigEndian =
  8.   result = new(DefaultBigEndian)
  9.   let root = if root == nil: result else: root
  10.   result.one = readU4be(stream)
  11.   result.root = root
  12.   result.parent = parent
Advertisement
Add Comment
Please, Sign In to add comment