diff options
| author | ame <[email protected]> | 2023-12-26 12:53:21 -0600 |
|---|---|---|
| committer | ame <[email protected]> | 2023-12-26 12:53:21 -0600 |
| commit | 3c4ce79c929a16602eecbb2a6600e1cea871439f (patch) | |
| tree | b8cf0d057f32624e5f5336787d4db369a33c211a /src/config.c | |
| parent | a94fea7fefbec0d8c307bbbdac9f3403dc00db2d (diff) | |
better pretty print
Diffstat (limited to 'src/config.c')
| -rw-r--r-- | src/config.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 25919d1..0c8a813 100644 --- a/src/config.c +++ b/src/config.c @@ -6,6 +6,7 @@ int _print_type = 0; int _max_depth = 2; int _start_nl_at = 3; int _collapse_all = 0; +int _collapse_to_memory = 1; int _file_malloc_chunk = 512; @@ -24,7 +25,13 @@ int l_set(lua_State* L) { int ind = get_config_map(lua_tostring(L,-2)); if(ind != -1) { - *config_map[ind].value = lua_tonumber(L,-1); + int key; + if(lua_isboolean(L, -1)){ + key = lua_toboolean(L, -1); + } else { + key = lua_tonumber(L, -1); + } + *config_map[ind].value = key; lua_pushnumber(L, 1); return 1; } |
