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

Function raxNewValueNode

rax.c:198–209  ·  view source on GitHub ↗

Create a standalone leaf node storing the specified value. */

Source from the content-addressed store, hash-verified

196
197/* Create a standalone leaf node storing the specified value. */
198static inline raxNode *raxNewValueNode(void *data) {
199 raxNode *leaf = raxNewNode(0,data != NULL);
200 if (leaf == NULL) return NULL;
201 leaf->iskey = 1;
202 if (data != NULL) {
203 leaf->isnull = 0;
204 raxSetData(leaf,data);
205 } else {
206 leaf->isnull = 1;
207 }
208 return leaf;
209}
210
211/* Convert an inline leaf value stored in 'parentlink' into a real leaf node. */
212static inline int raxMaterializeInlineLeaf(rax *rax, raxNode *parent,

Callers 2

raxMaterializeInlineLeafFunction · 0.85
raxAddChildNoAllocFunction · 0.85

Calls 2

raxNewNodeFunction · 0.85
raxSetDataFunction · 0.85

Tested by

no test coverage detected