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

Function raxSetData

rax.c:271–281  ·  view source on GitHub ↗

Set the node auxiliary data to the specified pointer. */

Source from the content-addressed store, hash-verified

269
270/* Set the node auxiliary data to the specified pointer. */
271void raxSetData(raxNode *n, void *data) {
272 n->iskey = 1;
273 if (data != NULL) {
274 n->isnull = 0;
275 void **ndata = (void**)
276 ((char*)n+raxNodeCurrentLength(n)-sizeof(void*));
277 memcpy(ndata,&data,sizeof(data));
278 } else {
279 n->isnull = 1;
280 }
281}
282
283/* Get the node auxiliary data. */
284void *raxGetData(raxNode *n) {

Callers 6

raxNewValueNodeFunction · 0.85
raxCompressNodeNoAllocFunction · 0.85
raxGenericInsertFunction · 0.85
raxRemoveChildAtPtrFunction · 0.85
raxIteratorSetDataFunction · 0.85
raxDefragReplaceDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected