realloc the node to make room for auxiliary data in order * to store an item in that node. On out of memory NULL is returned. */
| 217 | /* realloc the node to make room for auxiliary data in order |
| 218 | * to store an item in that node. On out of memory NULL is returned. */ |
| 219 | raxNode *raxReallocForData(raxNode *n, void *data) { |
| 220 | if (data == NULL) return n; /* No reallocation needed, setting isnull=1 */ |
| 221 | size_t curlen = raxNodeCurrentLength(n); |
| 222 | return rax_realloc(n,curlen+sizeof(void*)); |
| 223 | } |
| 224 | |
| 225 | /* Set the node auxiliary data to the specified pointer. */ |
| 226 | void raxSetData(raxNode *n, void *data) { |