1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-29 03:19:54 +00:00

Fix nanboxing issue.

This commit is contained in:
Calvin Rose 2020-05-10 20:14:47 -05:00
parent 273d1ff2d0
commit d05bb1c125

View File

@ -359,6 +359,26 @@ typedef struct JanetDictView JanetDictView;
typedef struct JanetRange JanetRange; typedef struct JanetRange JanetRange;
typedef struct JanetRNG JanetRNG; typedef struct JanetRNG JanetRNG;
/* Basic types for all Janet Values */
typedef enum JanetType {
JANET_NUMBER,
JANET_NIL,
JANET_BOOLEAN,
JANET_FIBER,
JANET_STRING,
JANET_SYMBOL,
JANET_KEYWORD,
JANET_ARRAY,
JANET_TUPLE,
JANET_TABLE,
JANET_STRUCT,
JANET_BUFFER,
JANET_FUNCTION,
JANET_CFUNCTION,
JANET_ABSTRACT,
JANET_POINTER
} JanetType;
/* Recursive type (Janet) */ /* Recursive type (Janet) */
#ifdef JANET_NANBOX_64 #ifdef JANET_NANBOX_64
typedef union Janet Janet; typedef union Janet Janet;
@ -414,26 +434,6 @@ typedef const Janet *JanetTuple;
typedef const JanetKV *JanetStruct; typedef const JanetKV *JanetStruct;
typedef void *JanetAbstract; typedef void *JanetAbstract;
/* Basic types for all Janet Values */
typedef enum JanetType {
JANET_NUMBER,
JANET_NIL,
JANET_BOOLEAN,
JANET_FIBER,
JANET_STRING,
JANET_SYMBOL,
JANET_KEYWORD,
JANET_ARRAY,
JANET_TUPLE,
JANET_TABLE,
JANET_STRUCT,
JANET_BUFFER,
JANET_FUNCTION,
JANET_CFUNCTION,
JANET_ABSTRACT,
JANET_POINTER
} JanetType;
#define JANET_COUNT_TYPES (JANET_POINTER + 1) #define JANET_COUNT_TYPES (JANET_POINTER + 1)
/* Type flags */ /* Type flags */