Lines Matching refs:datum
62 void cil_symtab_datum_init(struct cil_symtab_datum *datum) in cil_symtab_datum_init() argument
64 datum->name = NULL; in cil_symtab_datum_init()
65 datum->fqn = NULL; in cil_symtab_datum_init()
66 datum->symtab = NULL; in cil_symtab_datum_init()
67 cil_list_init(&datum->nodes, CIL_LIST_ITEM); in cil_symtab_datum_init()
70 void cil_symtab_datum_destroy(struct cil_symtab_datum *datum) in cil_symtab_datum_destroy() argument
72 cil_list_destroy(&datum->nodes, 0); in cil_symtab_datum_destroy()
73 cil_symtab_remove_datum(datum); in cil_symtab_datum_destroy()
76 void cil_symtab_datum_remove_node(struct cil_symtab_datum *datum, struct cil_tree_node *node) in cil_symtab_datum_remove_node() argument
78 if (datum && datum->nodes != NULL) { in cil_symtab_datum_remove_node()
79 cil_list_remove(datum->nodes, CIL_NODE, node, 0); in cil_symtab_datum_remove_node()
80 if (datum->nodes->head == NULL) { in cil_symtab_datum_remove_node()
81 cil_symtab_datum_destroy(datum); in cil_symtab_datum_remove_node()
88 int cil_symtab_insert(symtab_t *symtab, hashtab_key_t key, struct cil_symtab_datum *datum, struct c… in cil_symtab_insert() argument
90 int rc = hashtab_insert(symtab->table, key, (hashtab_datum_t)datum); in cil_symtab_insert()
92 datum->name = key; in cil_symtab_insert()
93 datum->fqn = key; in cil_symtab_insert()
94 datum->symtab = symtab; in cil_symtab_insert()
95 cil_list_append(datum->nodes, CIL_NODE, node); in cil_symtab_insert()
97 cil_list_append(datum->nodes, CIL_NODE, node); in cil_symtab_insert()
105 void cil_symtab_remove_datum(struct cil_symtab_datum *datum) in cil_symtab_remove_datum() argument
107 symtab_t *symtab = datum->symtab; in cil_symtab_remove_datum()
113 hashtab_remove(symtab->table, datum->name, NULL, NULL); in cil_symtab_remove_datum()
114 datum->symtab = NULL; in cil_symtab_remove_datum()
117 int cil_symtab_get_datum(symtab_t *symtab, char *key, struct cil_symtab_datum **datum) in cil_symtab_get_datum() argument
119 *datum = (struct cil_symtab_datum*)hashtab_search(symtab->table, (hashtab_key_t)key); in cil_symtab_get_datum()
120 if (*datum == NULL) { in cil_symtab_get_datum()
136 struct cil_symtab_datum *datum = d; in __cil_symtab_destroy_helper() local
137 datum->symtab = NULL; in __cil_symtab_destroy_helper()
167 struct cil_complex_symtab_datum *datum) in cil_complex_symtab_insert() argument
178 node->datum = datum; in cil_complex_symtab_insert()
236 *out = curr->datum; in cil_complex_symtab_search()