Skip to content

Commit

Permalink
Merge pull request #39 from rixed/fix-38
Browse files Browse the repository at this point in the history
Fix uint24 conversions to other int types
  • Loading branch information
rgrinberg authored Feb 5, 2020
2 parents a141f5e + 2066693 commit 5c396fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/uint24.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef OCAML_UINT24_H
#define OCAML_UINT24_H

#define Uint24_val(x) ((uint32_t)(((intnat)(x))))
#define Val_uint24(x) (((intnat)((x) & 0xFFFFFF) << 1) + 1)
#define Uint24_val(x) ((uint32_t)(Unsigned_long_val(x)))
#define Val_uint24(x) (Val_long((x) & 0xFFFFFF))

#endif

0 comments on commit 5c396fd

Please sign in to comment.