1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-06 02:23:03 +00:00

Initial threaded abstract types.

This commit is contained in:
Calvin Rose
2021-08-19 20:56:48 -05:00
parent e552757edc
commit eb0b37f729
7 changed files with 181 additions and 5 deletions

View File

@@ -55,10 +55,11 @@ enum JanetMemoryType {
JANET_MEMORY_FUNCTION,
JANET_MEMORY_ABSTRACT,
JANET_MEMORY_FUNCENV,
JANET_MEMORY_FUNCDEF
JANET_MEMORY_FUNCDEF,
JANET_MEMORY_THREADED_ABSTRACT,
};
/* To allocate collectable memory, one must calk janet_alloc, initialize the memory,
/* To allocate collectable memory, one must call janet_alloc, initialize the memory,
* and then call when janet_enablegc when it is initailize and reachable by the gc (on the JANET stack) */
void *janet_gcalloc(enum JanetMemoryType type, size_t size);