MCPcopy Create free account
hub / github.com/antirez/ds4 / raxReallocForData

Function raxReallocForData

rax.c:264–268  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

262/* realloc the node to make room for auxiliary data in order
263 * to store an item in that node. On out of memory NULL is returned. */
264raxNode *raxReallocForData(raxNode *n, void *data) {
265 if (data == NULL) return n; /* No reallocation needed, setting isnull=1 */
266 size_t curlen = raxNodeCurrentLength(n);
267 return rax_realloc(n,curlen+sizeof(void*));
268}
269
270/* Set the node auxiliary data to the specified pointer. */
271void raxSetData(raxNode *n, void *data) {

Callers 2

raxGenericInsertFunction · 0.85
raxIteratorSetDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected