git.haldean.org ubik / ef59487
tidy up humanize hook a little haldean 1 year, 10 months ago
1 changed file(s) with 1 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
5050 struct ubik_value *res;
5151 struct ubik_value *type;
5252 ubik_error err;
53 char *str;
54 size_t str_size;
5553
5654 err = ubik_value_new(&res, ws);
5755 if (err != OK)
6058 if (err != OK)
6159 return err;
6260
63 err = ubik_value_humanize(&str, &str_size, args[0]);
61 err = ubik_value_humanize(&res->str.data, &res->str.length, args[0]);
6462 if (err != OK)
6563 return err;
6664 res->type = UBIK_STR;
67 res->str.data = str;
68 res->str.length = str_size;
6965
7066 err = ubik_type_str(type);
7167 if (err != OK)