| 390 | } |
| 391 | |
| 392 | void incrRefCount(robj_roptr o) { |
| 393 | auto refcount = o->getrefcount(std::memory_order_relaxed); |
| 394 | if (refcount < OBJ_FIRST_SPECIAL_REFCOUNT) { |
| 395 | o->addref(); |
| 396 | } else { |
| 397 | if (refcount == OBJ_SHARED_REFCOUNT) { |
| 398 | /* Nothing to do: this refcount is immutable. */ |
| 399 | } else if (refcount == OBJ_STATIC_REFCOUNT) { |
| 400 | serverPanic("You tried to retain an object allocated in the stack"); |
| 401 | } |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | void decrRefCount(robj_roptr o) { |
| 406 | if (o->getrefcount(std::memory_order_relaxed) == OBJ_SHARED_REFCOUNT) |
no test coverage detected