Skip to content

Commit

Permalink
rmv code circumventing fable python bug 🔥
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Apr 4, 2024
1 parent 9f570b3 commit 025734d
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/Core/Helper/HashCodes.fs
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
module ARCtrl.Helper.HashCodes

open Fable.Core

// This is necessary until https://github.com/fable-compiler/Fable/issues/3778 is resolved

#if FABLE_COMPILER_PYTHON
[<Emit("hasattr($0,\"__hash__\")")>]
let pyHasCustomHash (obj) : bool = nativeOnly

[<Emit("$0.__hash__()")>]
let pyCustomHash (obj) : int = nativeOnly
#endif

let mergeHashes (hash1 : int) (hash2 : int) : int =
0x9e3779b9 + hash2 + (hash1 <<< 6) + (hash1 >>> 2)
Expand All @@ -27,14 +15,6 @@ let hashDateTime (dt : System.DateTime) : int =


let hash obj =
//#if FABLE_COMPILER_PYTHON
// if pyHasCustomHash obj then
// pyCustomHash obj
// else
// obj.GetHashCode()
//#else
// obj.GetHashCode()
//#endif
obj.GetHashCode()

let boxHashOption (a: 'a option) : obj =
Expand Down

0 comments on commit 025734d

Please sign in to comment.