1
0
Fork 0
forked from fun/fun

Added SQLite support and updated the Handbook. (0.32.0)

This commit is contained in:
Johannes Findeisen 2025-11-26 22:21:31 +01:00
commit 9416ec3457
17 changed files with 631 additions and 388 deletions

View file

@ -441,6 +441,15 @@ char *value_to_string_alloc(const Value *v) {
snprintf(buf, sizeof(buf), "[array n=%d]", n);
return strdup(buf);
}
case VAL_MAP: {
int n = 0;
if (v->type == VAL_MAP && v->map) {
const Map *m = (const Map*)v->map;
n = m ? m->count : 0;
}
snprintf(buf, sizeof(buf), "{map n=%d}", n);
return strdup(buf);
}
case VAL_NIL:
default:
return strdup("nil");