1 parent 793838a commit 82a165dCopy full SHA for 82a165d
1 file changed
py/nlr.h
@@ -3,23 +3,19 @@
3
4
#include <limits.h>
5
6
-//#ifndef __WORDSIZE
7
-//#error __WORDSIZE needs to be defined
8
-//#endif
9
-
10
typedef struct _nlr_buf_t nlr_buf_t;
11
struct _nlr_buf_t {
12
// the entries here must all be machine word size
13
nlr_buf_t *prev;
14
void *ret_val;
15
-#if __WORDSIZE == 32
+#if defined(__i386__)
16
void *regs[6];
17
-#elif __WORDSIZE == 64
+#elif defined(__x86_64__)
18
void *regs[8];
19
-#else
20
- // hack for thumb
+#elif defined(__thumb2__)
21
void *regs[10];
22
-//#error Unsupported __WORDSIZE
+#else
+#error Unknown arch in nlr.h
23
#endif
24
};
25
0 commit comments