mirror of
https://github.com/janet-lang/janet
synced 2025-10-26 05:07:41 +00:00
Abstract type getters can indicate key absence.
This change to the c api allows abstract types to indicate to the runtime if a key was absent, or if it meant to return nil.
This commit is contained in:
@@ -894,7 +894,7 @@ struct JanetAbstractType {
|
||||
const char *name;
|
||||
int (*gc)(void *data, size_t len);
|
||||
int (*gcmark)(void *data, size_t len);
|
||||
Janet(*get)(void *data, Janet key);
|
||||
int (*get)(void *data, Janet key, Janet *out);
|
||||
void (*put)(void *data, Janet key, Janet value);
|
||||
void (*marshal)(void *p, JanetMarshalContext *ctx);
|
||||
void *(*unmarshal)(JanetMarshalContext *ctx);
|
||||
|
||||
Reference in New Issue
Block a user