Make classRegistry use hashes instead of strings as keys for faster lookup

Up version to 0.7.16
This commit is contained in:
Evgeny Zuev 2018-08-28 14:05:33 +07:00 • committed by Ruslan Mustakov
commit ceaf66a34c
9 changed files with 101 additions and 23 deletions

View file

@ -66,6 +66,8 @@ type
GodotString* {.byref.} = object
data: array[sizeof(int), byte]
cwchar_t* {.importc: "wchar_t", nodecl.} = object
GodotCharString* {.byref.} = object
data: array[sizeof(int), byte]
@ -305,3 +307,6 @@ type
GodotClassConstructor* = proc (): ptr GodotObject {.
noconv, gcsafe, locks: 0, raises: [], tags: [].}
template offset*[T](p: ptr T, offset: int): ptr T =
cast[ptr T](cast[ByteAddress](p) +% (offset * sizeof(T)))