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

Function _bind_exported

lean_py/_runtime.py:283–296  ·  view source on GitHub ↗
(self, lib)

Source from the content-addressed store, hash-verified

281 return None
282
283 def _bind_exported(self, lib):
284 for func in model.exported_functions:
285 if func.is_variadic or not func.name:
286 continue
287 try:
288 cfunc = getattr(lib, func.name)
289 if func.params:
290 cfunc.argtypes = [_resolve_type(p.c_type, structs) for p in func.params]
291 restype = _resolve_type(func.return_type, structs)
292 if restype is not None:
293 cfunc.restype = restype
294 setattr(self, func.name, cfunc)
295 except AttributeError:
296 self._missing_symbols.append(func.name)
297
298 def _bind_inline_impls(self):
299 """No-op; inline methods are defined directly on the class."""

Callers

nothing calls this directly

Calls 1

_resolve_typeFunction · 0.85

Tested by

no test coverage detected