Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/libAtomVM/globalcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,13 +665,8 @@ bool globalcontext_is_atom_index_equal_to_atom_string(GlobalContext *glb, atom_i

term globalcontext_existing_term_from_atom_string(GlobalContext *glb, AtomString atom_string)
{
atom_index_t global_atom_index;
enum AtomTableEnsureAtomResult ensure_result = atom_table_ensure_atom(
glb->atom_table, atom_string_data(atom_string), atom_string_len(atom_string), AtomTableAlreadyExisting, &global_atom_index);
if (UNLIKELY(ensure_result != AtomTableEnsureAtomOk)) {
return term_invalid_term();
}
return term_from_atom_index(global_atom_index);
return globalcontext_existing_atom_from_buf(
glb, atom_string_data(atom_string), atom_string_len(atom_string));
}

int globalcontext_insert_module(GlobalContext *global, Module *module)
Expand Down
Loading