diff options
author | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-12-02 22:24:02 +0000 |
---|---|---|
committer | Stephen Dolan <mu@netsoc.tcd.ie> | 2012-12-02 22:52:38 +0000 |
commit | ed7f95a492b647c7da3fc4bc2c9194b4bbbf7622 (patch) | |
tree | c58d500063a0814dd2cbd66f4165a66a528ddf0b /builtin.c | |
parent | 63d10433c9e92028d5b6acda47119bde998eae1f (diff) |
Demote "contains" to a built-in function rather than an operator.
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -161,8 +161,7 @@ static jv f_greatereq(jv input, jv a, jv b) { return order_cmp(input, a, b, CMP_OP_GREATEREQ); } -static jv f_contains(jv input, jv a, jv b) { - jv_free(input); +static jv f_contains(jv a, jv b) { jv_kind akind = jv_get_kind(a); if (akind == jv_get_kind(b)) { @@ -242,7 +241,7 @@ static struct cfunction function_list[] = { {(cfunction_ptr)f_greater, "_greater", 3}, {(cfunction_ptr)f_lesseq, "_lesseq", 3}, {(cfunction_ptr)f_greatereq, "_greatereq", 3}, - {(cfunction_ptr)f_contains, "_contains", 3}, + {(cfunction_ptr)f_contains, "contains", 2}, {(cfunction_ptr)f_length, "length", 1}, {(cfunction_ptr)f_type, "type", 1}, {(cfunction_ptr)f_add, "add", 1}, |