MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / SI_TransferOwnership

Function SI_TransferOwnership

src/value.c:188–192  ·  view source on GitHub ↗

Clone 'v' and set v's allocation to volatile if 'v' owned the memory

Source from the content-addressed store, hash-verified

186
187// Clone 'v' and set v's allocation to volatile if 'v' owned the memory
188SIValue SI_TransferOwnership(SIValue *v) {
189 SIValue dup = *v;
190 if(v->allocation == M_SELF) v->allocation = M_VOLATILE;
191 return dup;
192}
193
194/* Update an SIValue marked as owning its internal allocations so that it instead is sharing them,
195 * with no responsibility for freeing or guarantee regarding scope.

Callers 3

Aggregate_GetResultFunction · 0.85
AR_DISTINCTFunction · 0.85
_build_group_keyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected