Lines Matching refs:node
51 HashNode *node = (HashNode *)root;
52 while (node != NULL) {
53 int ret = tab->nodeCompare(node, new);
55 return node;
57 node = node->next;
65 HashNode *node = (HashNode *)root;
66 while (node != NULL) {
67 int ret = keyCompare(node, key);
69 return node;
71 node = node->next;
76 int32_t OH_HashMapAdd(HashMapHandle handle, HashNode *node)
79 INIT_ERROR_CHECK(node != NULL && node->next == NULL, return -1, "Invalid param");
81 int hashCode = tab->nodeHash(node);
87 HashNode *tmp = GetHashNodeByNode(tab, tab->buckets[hashCode], node);
89 INIT_LOGE("node hash been exist");
92 node->next = tab->buckets[hashCode];
93 tab->buckets[hashCode] = node;
106 HashNode *node = tab->buckets[hashCode];
107 HashNode *preNode = node;
108 while (node != NULL) {
109 int ret = tab->keyCompare(node, key);
111 if (node == tab->buckets[hashCode]) {
112 tab->buckets[hashCode] = node->next;
114 preNode->next = node->next;
118 preNode = node;
119 node = node->next;
140 HashNode *node = root;
141 while (node != NULL) {
142 HashNode *next = node->next;
144 tab->nodeFree(node, context);
146 node = next;
171 void OH_HashMapTraverse(HashMapHandle handle, void (*hashNodeTraverse)(const HashNode *node, const void *context),
177 HashNode *node = tab->buckets[i];
178 while (node != NULL) {
179 HashNode *next = node->next;
180 hashNodeTraverse(node, context);
181 node = next;
191 HashNode *node = tab->buckets[i];
192 if (node != NULL) {