MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / lean_inc_ref_n

Function lean_inc_ref_n

lean_py/_runtime.py:373–383  ·  view source on GitHub ↗
(self, o, n)

Source from the content-addressed store, hash-verified

371 o.contents.m_rc += 1
372
373 def lean_inc_ref_n(self, o, n):
374 if o is None:
375 return
376 helper = self._find_leanpy_helper("leanpy_inc_ref_n")
377 if helper is not None:
378 helper.argtypes = [c_void_p, c_size_t]
379 helper.restype = None
380 helper(_ptr_as_int(o), n)
381 return
382 if o.contents.m_rc > 0:
383 o.contents.m_rc += n
384
385 def lean_dec_ref(self, o):
386 # Delegate to the C-side helper that correctly handles MT objects

Callers 1

leanpy_inc_ref_nFunction · 0.85

Calls 1

_ptr_as_intFunction · 0.85

Tested by

no test coverage detected