mirror of
https://github.com/janet-lang/janet
synced 2025-10-31 23:53:02 +00:00
Merge remote-tracking branch 'upstream/master' into ta-with-marshal
This commit is contained in:
@@ -446,7 +446,7 @@ static void marshal_one(MarshalState *st, Janet x, int flags) {
|
||||
int32_t i, count, flag;
|
||||
const Janet *tup = janet_unwrap_tuple(x);
|
||||
count = janet_tuple_length(tup);
|
||||
flag = janet_tuple_flag(tup);
|
||||
flag = janet_tuple_flag(tup) >> 16;
|
||||
pushbyte(st, LB_TUPLE);
|
||||
pushint(st, count);
|
||||
pushint(st, flag);
|
||||
@@ -847,6 +847,9 @@ static const uint8_t *unmarshal_one_fiber(
|
||||
fiber->data = NULL;
|
||||
fiber->child = NULL;
|
||||
|
||||
/* Push fiber to seen stack */
|
||||
janet_array_push(&st->lookup, janet_wrap_fiber(fiber));
|
||||
|
||||
/* Set frame later so fiber can be GCed at anytime if unmarshalling fails */
|
||||
int32_t frame = 0;
|
||||
int32_t stack = 0;
|
||||
@@ -1087,7 +1090,7 @@ static const uint8_t *unmarshal_one(
|
||||
/* Tuple */
|
||||
Janet *tup = janet_tuple_begin(len);
|
||||
int32_t flag = readint(st, &data);
|
||||
janet_tuple_flag(tup) = flag;
|
||||
janet_tuple_flag(tup) |= flag << 16;
|
||||
for (int32_t i = 0; i < len; i++) {
|
||||
data = unmarshal_one(st, data, tup + i, flags + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user