fixup: bfredl comments

This commit is contained in:
TJ DeVries
2020-10-20 20:26:53 -04:00
parent 78556aba7d
commit 1afe6dd2f4
3 changed files with 11 additions and 17 deletions

View File

@@ -1619,7 +1619,9 @@ free_exit:
return virt_text;
}
bool api_is_truthy(Object obj, const char *what, bool nil_truthy, Error *err)
/// Force obj to bool.
/// If it fails, returns false and sets err
bool api_coerce_to_bool(Object obj, const char *what, bool nil_truthy, Error *err)
{
if (obj.type == kObjectTypeBoolean) {
return obj.data.boolean;