lean4-htt/src/Init/System
Mac Malone c16e88644c
feat: Runtime.hold (#13270)
This PR adds `Runtime.hold`, which ensures its argument remains alive
until the callsite by holding a reference to it. This can be useful for
unsafe code (such as an FFI) that relies on a Lean object not being
freed until after some point in the program.

It is implemented via a `static inline` function in `lean.h` so that C
will optimize away the call.

---------

Co-authored-by: Henrik Böving <hargonix@gmail.com>
2026-04-07 08:44:35 +00:00
..
FilePath.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
IO.lean feat: Runtime.hold (#13270) 2026-04-07 08:44:35 +00:00
IOError.lean chore: more reorganization of strings (#10928) 2025-10-23 11:56:11 +00:00
Platform.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00
Promise.lean chore: remove >6 month old deprecations (#10446) 2025-09-22 12:47:11 +00:00
ST.lean fix: address unused simp theorem warnings (#12829) 2026-03-06 23:12:03 +00:00
Uri.lean chore: shake core (#12276) 2026-02-05 09:10:32 +00:00