tiny.python.Result
Defined in runtime.vm.
A finished run's value together with the heap that owns every object the value can point to.
API (3)
Actions
Public operations.
deinit: Frees the heap of the returned value, and every value derived from it becomes invalid.
Fields and members
Public fields and members.
Source
Source: lib/python/src/runtime/vm.zig:80
zig
/// A finished run's value together with the heap that owns every object the value can point to./// `execute` returns one, and the caller reads `value` and then frees everything with `deinit`./// `value` stays valid until `deinit`. Strings in `value` can borrow the source text passed to/// `execute`, so that text has to stay alive while `value` is in use.pub const Result = struct { /// The program's value: the value of its last top-level expression statement, or `None` when no /// expression statement ran. value: object.Value, /// The heap that owns every object `value` can point to. heap: object.Heap, /// Frees the heap of the returned value, and every value derived from it becomes invalid. The /// caller of `execute` defers it right after the call, as the README's example does. The call /// leaves the result undefined. pub fn deinit(self: *Result) void { self.heap.deinit(); self.* = undefined; }};Source: lib/python/src/root.zig:96
zig
pub const Result = runtime.Result;Also reachable as
Audit
| Definitions | 2 |
|---|---|
| Public names | 6 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |