From: Jérémie Astor Date: Thu, 23 Jul 2020 12:07:31 +0000 (+0200) Subject: :art: Improve string eq X-Git-Tag: nightly~1421 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=127531c847da1ca3b492dfbd1119469f0e44b00b;p=gwion.git :art: Improve string eq --- diff --git a/src/lib/string.c b/src/lib/string.c index 4ddc7b87..98422c1f 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -30,9 +30,8 @@ static INSTR(String_##name) { \ release(lhs, shred); \ release(rhs, shred); \ } -describe_string_logical(eq, (lhs && rhs && !strcmp(STRING(lhs), STRING(rhs))) || (!lhs && !rhs)) -describe_string_logical(neq, (lhs && rhs && strcmp(STRING(lhs), STRING(rhs))) || - (lhs && !rhs) || (!lhs && rhs)) +describe_string_logical(eq, (lhs && rhs && STRING(lhs) == STRING(rhs)) || (!lhs && !rhs)) +describe_string_logical(neq, !(lhs && rhs && STRING(lhs) == STRING(rhs)) || (!lhs && !rhs)) static INSTR(String_Assign) { POP_REG(shred, SZ_INT);