mirror of
https://github.com/janet-lang/janet
synced 2026-08-15 23:08:53 +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:
+1
-1
@@ -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