Skip to content

Commit

Permalink
Add all missing option constructors added in 4.12
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterDA committed Dec 8, 2023
1 parent 1e14d45 commit b34b939
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#define UNUSED(x) (void)(x)

#include <caml/version.h>

#if OCAML_VERSION < 41200
#define Val_none Val_int(0)
#define Some_val(v) Field(v,0)
#define Some_val(v) Field(v, 0)
#define Tag_some 0
#define Is_none(v) ((v) == Val_none)
#define Is_some(v) Is_block(v)
#endif

int extunix_open_flags(value);

0 comments on commit b34b939

Please sign in to comment.