atom_table.h
Include dependency graph for atom_table.h:
This graph shows which files directly or indirectly include atom_table.h:
Typedefs
-
typedef const void *atom_ref_t
Enums
Functions
-
struct AtomTable *atom_table_new()
-
void atom_table_destroy(struct AtomTable *table)
-
size_t atom_table_count(struct AtomTable *table)
-
atom_index_t atom_table_get_index(struct AtomTable *table, AtomString string)
-
atom_index_t atom_table_get_index_from_cstring(struct AtomTable *table, const char *name)
-
enum AtomTableEnsureAtomResult atom_table_ensure_atom(struct AtomTable *table, const uint8_t *atom_data, size_t atom_len, enum AtomTableCopyOpt opts, atom_index_t *result)
-
enum AtomTableEnsureAtomResult atom_table_ensure_atoms(struct AtomTable *table, const void *atoms, size_t count, atom_index_t *translate_table, enum EnsureAtomsOpt opts)
-
bool atom_table_is_equal_to_atom_string(struct AtomTable *table, atom_index_t t_atom_index, AtomString atom_string)
-
int atom_table_cmp_using_atom_index(struct AtomTable *table, atom_index_t t_atom_index, atom_index_t other_atom_index)
-
atom_ref_t atom_table_get_atom_ptr_and_len(struct AtomTable *table, atom_index_t index, size_t *out_len)
-
bool atom_table_is_atom_ref_ascii(struct AtomTable *table, atom_ref_t atom)
-
const uint8_t *atom_table_get_atom_string(struct AtomTable *table, atom_index_t index, size_t *out_len)
Get a pointer to the character data of a given atom.
returned pointer is not null terminated
- Parameters:
table – atom table
atom_index – index of the atom to get the representation of
out_len – on output, size of the character data
-
static inline void atom_table_write_mfa(struct AtomTable *table, char *buf, size_t buf_size, atom_index_t module, atom_index_t function, unsigned int arity)
Write module:function/arity to the supplied buffer.
Write module:function/arity to the supplied buffer. This function will abort if the written module, function, and arity are longer than the supplied buffer size.
- Parameters:
buf – the buffer to write into
buf_size – the amount of room in the buffer
module – the module name
function – the function name
arity – the function arity