rename std extensions and clean up imports

This commit is contained in:
2026-07-15 23:00:43 +02:00
parent 3e8db2c15e
commit cae32caa82
8 changed files with 9 additions and 14 deletions
@@ -1,4 +1,4 @@
mem :: import "@std/mem" import "@std/mem"
ArrayList func($T type) type { ArrayList func($T type) type {
return struct { return struct {
+2 -2
View File
@@ -1,5 +1,5 @@
c :: import "@ffi/c" import "@ffi/c"
io :: import "@std/io" import "@std/io"
hide write func(_ ?*mut anyopaque, _ io.WriteStream, bytes []u8) usize ! io.WriteError { hide write func(_ ?*mut anyopaque, _ io.WriteStream, bytes []u8) usize ! io.WriteError {
request usize = bytes.len request usize = bytes.len
+4 -9
View File
@@ -1,5 +1,5 @@
c :: import "@ffi/c" import "@ffi/c"
meta :: import "@std/meta" import "@std/meta"
ReadError :: enum { ReadError :: enum {
read_failed read_failed
@@ -276,7 +276,7 @@ hide write_integer func(writer Writer, $T type, value T, base u64, uppercase boo
return return
} }
# ponytail: libc keeps float formatting small; replace it with a native shortest-roundtrip writer if locale independence matters. # note: libc keeps float formatting small; replace it with a native shortest-roundtrip writer if locale independence matters.
hide write_float func(writer Writer, $T type, value T, scientific bool) void ! WriteError { hide write_float func(writer Writer, $T type, value T, scientific bool) void ! WriteError {
match typeinfo!(T) { match typeinfo!(T) {
.float: { .float: {
@@ -353,12 +353,7 @@ hide write_default func(writer Writer, $T type, value T) void ! WriteError {
return return
} }
print func( print func(writer Writer, $format []u8, $Args type, args Args) void ! WriteError {
writer Writer,
$format []u8,
$Args type,
args Args,
) void ! WriteError {
inline for parse_format(format.len, format, Args) |token| { inline for parse_format(format.len, format, Args) |token| {
if (token.kind == .unused) { if (token.kind == .unused) {
break break
+1 -1
View File
@@ -1,4 +1,4 @@
c :: import "@ffi/c" import "@ffi/c"
AllocError :: enum { AllocError :: enum {
out_of_memory out_of_memory
@@ -1,4 +1,4 @@
io :: import "@std/io" import "@std/io"
Init :: struct { Init :: struct {
io io.Io io io.Io
View File