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

Function register_handle

lean_py/_runtime.py:252–259  ·  view source on GitHub ↗

Register an additional dlopen handle as a source of symbols when looking up `leanpy_*` helpers. Called by `LeanLibrary` after loading a user dylib.

(self, lib)

Source from the content-addressed store, hash-verified

250 self.lean_io_mark_end_initialization = None # type: ignore[assignment]
251
252 def register_handle(self, lib):
253 """Register an additional dlopen handle as a source of symbols
254 when looking up `leanpy_*` helpers. Called by `LeanLibrary` after
255 loading a user dylib."""
256 if lib not in self._extra_handles:
257 self._extra_handles.append(lib)
258 if hasattr(self, "_helper_cache"):
259 self._helper_cache.clear()
260
261 def _find_leanpy_helper(self, name):
262 """Find a `leanpy_*` helper symbol in any registered library.

Callers

nothing calls this directly

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected