File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ extern "C" {
45
45
#define ATOM_STR (LENSTR , STR ) (LENSTR STR)
46
46
47
47
typedef const void * AtomString ;
48
+ typedef uint32_t AtomIndex ;
48
49
49
50
/**
50
51
* @brief Gets a C string from an AtomString
Original file line number Diff line number Diff line change 37
37
#include <stdlib.h>
38
38
#include <string.h>
39
39
40
+ #include "atom.h"
40
41
#include "memory.h"
41
42
#include "refc_binary.h"
42
43
#include "utils.h"
@@ -599,7 +600,7 @@ static inline term term_nil()
599
600
* @param t the term that will be converted to atom table index. t must be a valid atom term.
600
601
* @return a global atom table index.
601
602
*/
602
- static inline int term_to_atom_index (term t )
603
+ static inline AtomIndex term_to_atom_index (term t )
603
604
{
604
605
return t >> 6 ;
605
606
}
@@ -611,7 +612,7 @@ static inline int term_to_atom_index(term t)
611
612
* @param atom_index global atoms table index.
612
613
* @return a term that encapsulates the atom.
613
614
*/
614
- static inline term term_from_atom_index (int atom_index )
615
+ static inline term term_from_atom_index (AtomIndex atom_index )
615
616
{
616
617
return TERM_FROM_ATOM_INDEX (atom_index );
617
618
}
You can’t perform that action at this time.
0 commit comments