File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11module ARCtrl.Helper.HashCodes
2-
3- open Fable.Core
4-
5- // This is necessary until https://github.com/fable-compiler/Fable/issues/3778 is resolved
6-
7- #if FABLE_ COMPILER_ PYTHON
8- [<Emit( " hasattr($0,\" __hash__\" )" ) >]
9- let pyHasCustomHash ( obj ) : bool = nativeOnly
10-
11- [<Emit( " $0.__hash__()" ) >]
12- let pyCustomHash ( obj ) : int = nativeOnly
13- #endif
142
153let mergeHashes ( hash1 : int ) ( hash2 : int ) : int =
164 0x9e3779b9 + hash2 + ( hash1 <<< 6 ) + ( hash1 >>> 2 )
@@ -27,14 +15,6 @@ let hashDateTime (dt : System.DateTime) : int =
2715
2816
2917let hash obj =
30- //#if FABLE_COMPILER_PYTHON
31- // if pyHasCustomHash obj then
32- // pyCustomHash obj
33- // else
34- // obj.GetHashCode()
35- //#else
36- // obj.GetHashCode()
37- //#endif
3818 obj.GetHashCode()
3919
4020let boxHashOption ( a : 'a option ) : obj =
You can’t perform that action at this time.
0 commit comments