Skip to content

Commit 2addff8

Browse files
committed
Add stdbool.h and extern "C" guards in j.h
1 parent a4b7e41 commit 2addff8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

jsrc/j.h

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
/* */
44
/* Global Definitions */
55

6+
#ifdef __cplusplus
7+
extern "C" {
8+
#else
9+
#include <stdbool.h>
10+
#endif
11+
612
#if defined(__clang_major__) && !defined(__clang__)
713
#error need workaround by define __clang__ in preprocessor macro
814
#endif
@@ -1135,3 +1141,7 @@ _clearfp(void) {
11351141

11361142
// Create (x&y) where x and y are signed, so we can test for overflow.
11371143
#define XANDY(x, y) ((I)((UI)(x) & (UI)(y)))
1144+
1145+
#ifdef __cplusplus
1146+
}
1147+
#endif

jsrc/je.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ extern A jtcreatecycliciterator(J, A, A);
551551
extern A jtcrelocalsyms(J, A, A, I, I, I);
552552
extern A jtcstr(J, C*);
553553
extern A jtcvt(J, I, A);
554-
extern B jtccvt(J, I, A, A*);
554+
extern bool jtccvt(J, I, A, A*);
555555
extern A jtcvz(J, I, A);
556556
extern A jtdaxis(J, I, A);
557557
extern A jtddtokens(J, A, I);

0 commit comments

Comments
 (0)