33 fprintf(stderr,
"Runtime type error: serial_recv expects (int fd, int maxlen)\n");
36 int maxlen = (int)maxv.
i;
37 if (maxlen <= 0) maxlen = 4096;
38 if (maxlen > 1 << 20) maxlen = 1 << 20;
39 out = (
char *)malloc((
size_t)maxlen + 1);
41 ssize_t
n = read(
fd,
out, (
size_t)maxlen);
Tagged union representing a Fun value.
Value make_string(const char *s)
Construct a string Value by duplicating the given C string.
static Value pop_value(VM *vm)
Pop a Value from the VM operand stack.
static void push_value(VM *vm, Value v)
Push a Value onto the VM operand stack.