py: Implement bool unary op; tidy up unary op dispatch.

This commit is contained in:
Damien George
2014-01-23 18:27:51 +00:00
parent b051e7d167
commit 1e708fed18
4 changed files with 21 additions and 7 deletions

View File

@@ -447,7 +447,7 @@ bool mp_obj_str_equal(mp_obj_t s1, mp_obj_t s2) {
if (l1 != l2) {
return false;
}
return strncmp((const char*)d1, (const char*)d2, l1) == 0;
return memcmp(d1, d2, l1) == 0;
}
}