Files
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

13 lines
354 B
Mojo
Generated

from std.memory.alloc import unsafe_alloc
def main():
# Stage a single encoder reading in a scratch buffer.
# BUG: allocate, write the value, read it back, then release it.
var ptr = unsafe_alloc(1)
ptr.unsafe_write(copy=99)
var value = ptr[]
print("Encoder count:", value)
ptr.unsafe_deinit_pointee()
ptr.unsafe_free()