Skip to content

Commit

Permalink
Merge pull request #307 from kubek2k/fixing-64bit-word
Browse files Browse the repository at this point in the history
Magic.hs: Fix for machines without MEM_UNALIGNED_OPS  and base >= 4.17
  • Loading branch information
bgamari committed May 18, 2023
2 parents ec399a1 + 7b94c5a commit 3a0f1f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cborg/src/Codec/CBOR/Magic.hs
Expand Up @@ -257,11 +257,15 @@ grabWord64 (Ptr ip#) =
#endif

#if WORD_SIZE_IN_BITS == 64
#if MIN_VERSION_base(4,17,0)
-- case taken from Codec.CBOR.Decoding
w64 w# = W64# (wordToWord64# (toWord w#))
#else
w64 w# = W64# (toWord w#)
#endif
#else
w64 w# = W64# (wordToWord64# (toWord w#))
#endif

#endif

--------------------------------------------------------------------------------
Expand Down

0 comments on commit 3a0f1f4

Please sign in to comment.