Skip to content

Commit bef14ca

Browse files
committed
bindings/blst.h: harmonize with the new C23 standard.
Fixes supranational#240.
1 parent 2c70815 commit bef14ca

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

bindings/blst.h

+9-7
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@ typedef __UINT64_TYPE__ uint64_t;
2323

2424
#ifdef __cplusplus
2525
extern "C" {
26-
#elif defined(__BLST_CGO__)
26+
#elif !defined(__STDC_VERSION__) || __STDC_VERSION__<202311
27+
# if defined(__BLST_CGO__)
2728
typedef _Bool bool; /* it's assumed that cgo calls modern enough compiler */
28-
#elif !defined(bool)
29-
# if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901
30-
# define bool _Bool
31-
# else
32-
# define bool int
29+
# elif !defined(bool)
30+
# if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901
31+
# define bool _Bool
32+
# else
33+
# define bool int
34+
# endif
35+
# define __blst_h_bool__
3336
# endif
34-
# define __blst_h_bool__
3537
#endif
3638

3739
#ifdef SWIG

0 commit comments

Comments
 (0)