pointer arithmetic helpers
This commit is contained in:
parent
9815d9708f
commit
ee803f088f
|
@ -0,0 +1,5 @@
|
|||
proc baseAddr*[T](x: openarray[T]): pointer = cast[pointer](x)
|
||||
|
||||
proc shift*(p: pointer, delta: int): pointer =
|
||||
cast[pointer](cast[int](p) + delta)
|
||||
|
Loading…
Reference in New Issue