MCPcopy Create free account
hub / github.com/F-Stack/f-stack / incrRefCount

Function incrRefCount

app/redis-6.2.6/src/object.c:364–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364void incrRefCount(robj *o) {
365 if (o->refcount < OBJ_FIRST_SPECIAL_REFCOUNT) {
366 o->refcount++;
367 } else {
368 if (o->refcount == OBJ_SHARED_REFCOUNT) {
369 /* Nothing to do: this refcount is immutable. */
370 } else if (o->refcount == OBJ_STATIC_REFCOUNT) {
371 serverPanic("You tried to retain an object allocated in the stack");
372 }
373 }
374}
375
376void decrRefCount(robj *o) {
377 if (o->refcount == 1) {

Callers 15

luaCreateFunctionFunction · 0.85
blockForKeysFunction · 0.85
signalKeyAsReadyFunction · 0.85
pubsubSubscribeChannelFunction · 0.85
pubsubUnsubscribeChannelFunction · 0.85
pubsubSubscribePatternFunction · 0.85
pubsubUnsubscribePatternFunction · 0.85
geoaddCommandFunction · 0.85
setGenericCommandFunction · 0.85
appendCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected