MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / raxSetData

Function raxSetData

src/rax.c:226–236  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

224
225/* Set the node auxiliary data to the specified pointer. */
226void raxSetData(raxNode *n, void *data) {
227 n->iskey = 1;
228 if (data != NULL) {
229 n->isnull = 0;
230 void **ndata = (void**)
231 ((char*)n+raxNodeCurrentLength(n)-sizeof(void*));
232 memcpy(ndata,&data,sizeof(data));
233 } else {
234 n->isnull = 1;
235 }
236}
237
238/* Get the node auxiliary data. */
239void *raxGetData(raxNode *n) {

Callers 5

raxCompressNodeFunction · 0.85
raxGenericInsertFunction · 0.85
raxRemoveChildFunction · 0.85
scanLaterStreamListpacksFunction · 0.85
defragRadixTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected