MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / Own

Function Own

common/memory.h:268–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266 static void Destroy(uintptr_t ptr) noexcept { Unown(ptr); }
267
268 static uintptr_t Own(uintptr_t ptr) noexcept {
269 if (IsReferenceCount(ptr)) {
270 const auto* refcount = Owner::AsReferenceCount(ptr);
271 ABSL_ASSUME(refcount != nullptr);
272 common_internal::StrongRef(refcount);
273 }
274 return ptr;
275 }
276
277 static void Unown(uintptr_t ptr) noexcept {
278 if (IsReferenceCount(ptr)) {

Callers 4

CopyFromFunction · 0.85
OwnerMethod · 0.85
OwnMethod · 0.85
OwnableClass · 0.85

Calls 3

IsReferenceCountFunction · 0.85
AsReferenceCountFunction · 0.85
StrongRefFunction · 0.85

Tested by

no test coverage detected