Skip to content

Commit d0a6cc7

Browse files
committed
Update the defineFunction() calls according to the recent change in the API
1 parent a356e13 commit d0a6cc7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

json.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,20 +322,20 @@ int KAOS_EXPORT KaosRegister(struct Kaos _kaos)
322322
kaos = _kaos;
323323

324324
// Dictionary operations
325-
kaos.defineFunction("keys", K_LIST, keys_params_name, keys_params_type, keys_params_length);
326-
kaos.defineFunction("values", K_LIST, values_params_name, values_params_type, values_params_length);
327-
kaos.defineFunction("flip", K_DICT, flip_params_name, flip_params_type, flip_params_length);
325+
kaos.defineFunction("keys", K_LIST, K_ANY, keys_params_name, keys_params_type, keys_params_length);
326+
kaos.defineFunction("values", K_LIST, K_ANY, values_params_name, values_params_type, values_params_length);
327+
kaos.defineFunction("flip", K_DICT, K_ANY, flip_params_name, flip_params_type, flip_params_length);
328328

329329
// JSON related
330-
kaos.defineFunction("encode", K_STRING, encode_params_name, encode_params_type, encode_params_length);
331-
kaos.defineFunction("decode", K_DICT, decode_params_name, decode_params_type, decode_params_length);
330+
kaos.defineFunction("encode", K_STRING, K_ANY, encode_params_name, encode_params_type, encode_params_length);
331+
kaos.defineFunction("decode", K_DICT, K_ANY, decode_params_name, decode_params_type, decode_params_length);
332332

333333
// Searching & Replacing
334-
kaos.defineFunction("search", K_STRING, search_params_name, search_params_type, search_params_length);
335-
kaos.defineFunction("replace", K_DICT, replace_params_name, replace_params_type, replace_params_length);
334+
kaos.defineFunction("search", K_STRING, K_ANY, search_params_name, search_params_type, search_params_length);
335+
kaos.defineFunction("replace", K_DICT, K_ANY, replace_params_name, replace_params_type, replace_params_length);
336336

337337
// Information functions
338-
kaos.defineFunction("count", K_NUMBER, count_params_name, count_params_type, count_params_length);
338+
kaos.defineFunction("count", K_NUMBER, K_ANY, count_params_name, count_params_type, count_params_length);
339339

340340
return 0;
341341
}

0 commit comments

Comments
 (0)