We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The bold code fragment should be IS_EMPTY. Otherwise the key nil would not be possible in a hash table.
IS_EMPTY
nil
+bool tableGet(Table* table, Value key, Value* value) { if (table->entries == NULL) return false;
Entry* entry = findEntry(table->entries, table->capacity, key);
if (IS_NIL(entry->key)) return false;
*value = entry->value; return true;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The bold code fragment should be
IS_EMPTY
. Otherwise the keynil
would not be possible in a hash table.+bool tableGet(Table* table, Value key, Value* value) {
if (table->entries == NULL) return false;
Entry* entry = findEntry(table->entries, table->capacity, key);
if (IS_NIL(entry->key)) return false;
*value = entry->value;
return true;
The text was updated successfully, but these errors were encountered: