Skip to documentation
SLOP

tiny.python.Result

Reference 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.

Fields and members

Public fields and members.

No direct callersNo direct callsruntime.vmResult
Static calls · unresolved targets: unknown · external targets: unknown.

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

runtime.Result.

Audit

Definitions2
Public names6
Members2
Version26.7.0
Revisiondaab053ee433