Implement hash proc for Godot types
This commit is contained in:
parent
4eb771e9be
commit
76de026b4f
15 changed files with 139 additions and 38 deletions
|
|
@ -1,5 +1,7 @@
|
|||
# Copyright (c) 2018 Xored Software, Inc.
|
||||
|
||||
import hashes
|
||||
|
||||
import godotcoretypes, internal.godotinternaltypes, gdnativeapi
|
||||
|
||||
proc initRID*(): RID {.inline.} =
|
||||
|
|
@ -14,6 +16,9 @@ proc id*(self: RID): uint32 {.inline.} =
|
|||
proc `$`*(self: RID): string {.inline.} =
|
||||
$self.id
|
||||
|
||||
proc hash*(self: RID): Hash {.inline.} =
|
||||
self.id.hash()
|
||||
|
||||
proc `==`*(a, b: RID): bool {.inline.} =
|
||||
getGDNativeAPI().ridOperatorEqual(a, b)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue