diff options
| author | Mike Pall <mike> | 2023-10-21 13:18:51 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2023-10-21 13:18:51 +0200 |
| commit | 4eb47df605883e983dadb78f303b22dd0232dd03 (patch) | |
| tree | 2e4c3d368457001159f92da775aab030b142ce80 | |
| parent | 7269b021302591a0088bd9109ebe4a59888494f0 (diff) | |
| download | luajit-4eb47df605883e983dadb78f303b22dd0232dd03.tar.gz luajit-4eb47df605883e983dadb78f303b22dd0232dd03.tar.bz2 luajit-4eb47df605883e983dadb78f303b22dd0232dd03.zip | |
FFI/Windows: Fix type declaration for int64_t and uint64_t.
Thanks to Peter Cawley. #1106
| -rw-r--r-- | src/lj_ctype.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lj_ctype.h b/src/lj_ctype.h index 45e7234e..cde1cf01 100644 --- a/src/lj_ctype.h +++ b/src/lj_ctype.h | |||
| @@ -276,6 +276,8 @@ typedef struct CTState { | |||
| 276 | #define CTTYDEFP(_) | 276 | #define CTTYDEFP(_) |
| 277 | #endif | 277 | #endif |
| 278 | 278 | ||
| 279 | #define CTF_LONG_IF8 (CTF_LONG * (sizeof(long) == 8)) | ||
| 280 | |||
| 279 | /* Common types. */ | 281 | /* Common types. */ |
| 280 | #define CTTYDEF(_) \ | 282 | #define CTTYDEF(_) \ |
| 281 | _(NONE, 0, CT_ATTRIB, CTATTRIB(CTA_BAD)) \ | 283 | _(NONE, 0, CT_ATTRIB, CTATTRIB(CTA_BAD)) \ |
| @@ -289,8 +291,8 @@ typedef struct CTState { | |||
| 289 | _(UINT16, 2, CT_NUM, CTF_UNSIGNED|CTALIGN(1)) \ | 291 | _(UINT16, 2, CT_NUM, CTF_UNSIGNED|CTALIGN(1)) \ |
| 290 | _(INT32, 4, CT_NUM, CTALIGN(2)) \ | 292 | _(INT32, 4, CT_NUM, CTALIGN(2)) \ |
| 291 | _(UINT32, 4, CT_NUM, CTF_UNSIGNED|CTALIGN(2)) \ | 293 | _(UINT32, 4, CT_NUM, CTF_UNSIGNED|CTALIGN(2)) \ |
| 292 | _(INT64, 8, CT_NUM, CTF_LONG|CTALIGN(3)) \ | 294 | _(INT64, 8, CT_NUM, CTF_LONG_IF8|CTALIGN(3)) \ |
| 293 | _(UINT64, 8, CT_NUM, CTF_UNSIGNED|CTF_LONG|CTALIGN(3)) \ | 295 | _(UINT64, 8, CT_NUM, CTF_UNSIGNED|CTF_LONG_IF8|CTALIGN(3)) \ |
| 294 | _(FLOAT, 4, CT_NUM, CTF_FP|CTALIGN(2)) \ | 296 | _(FLOAT, 4, CT_NUM, CTF_FP|CTALIGN(2)) \ |
| 295 | _(DOUBLE, 8, CT_NUM, CTF_FP|CTALIGN(3)) \ | 297 | _(DOUBLE, 8, CT_NUM, CTF_FP|CTALIGN(3)) \ |
| 296 | _(COMPLEX_FLOAT, 8, CT_ARRAY, CTF_COMPLEX|CTALIGN(2)|CTID_FLOAT) \ | 298 | _(COMPLEX_FLOAT, 8, CT_ARRAY, CTF_COMPLEX|CTALIGN(2)|CTID_FLOAT) \ |
