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

Function lean_array_get_core

lean_py/_runtime.py:530–536  ·  view source on GitHub ↗
(self, o, i)

Source from the content-addressed store, hash-verified

528 return arr.contents.m_size
529
530 def lean_array_get_core(self, o, i):
531 arr_cls = structs.get("lean_array_object")
532 arr = ctypes.cast(o, POINTER(arr_cls))
533 offset = arr_cls.m_data.offset
534 addr = ctypes.addressof(arr.contents) + offset
535 ptr_array = ctypes.cast(addr, POINTER(LeanObjectPtr * (i + 1)))
536 return ptr_array.contents[i]
537
538 def lean_string_size(self, o):
539 str_cls = structs.get("lean_string_object")

Callers 5

lean_py_of_listFunction · 0.85
lean_py_of_tupleFunction · 0.85
lean_py_of_dictFunction · 0.85
lean_py_callFunction · 0.85
lean_py_call_kwFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected