migrate to sx cstring era: std env() replaces local getenv/strlen, alloc_string rename
sx 1d17b0a reserves 'cstring' as the C-boundary string type and renames std's cstring(size) allocator to alloc_string; std getenv is now (cstring) -> ?cstring, so the local conflicting binding (caught by the new same-symbol diagnostic) and its strlen/copy loop collapse into a process.env delegation. iOS-sim build + 22/22 snapshots green.
This commit is contained in:
4
board.sx
4
board.sx
@@ -202,7 +202,7 @@ pick_gem :: (board: *Board, rng: *Rng, col: i64, row: i64) -> Gem {
|
||||
// single gem character per cell. Suitable for snapshotting.
|
||||
board_dump :: (self: *Board) -> string {
|
||||
line_w := BOARD_COLS + 1; // 8 gem chars + newline
|
||||
buf := cstring(BOARD_ROWS * line_w);
|
||||
buf := alloc_string(BOARD_ROWS * line_w);
|
||||
for 0..BOARD_ROWS (row) {
|
||||
base := row * line_w;
|
||||
for 0..BOARD_COLS (col) {
|
||||
@@ -298,7 +298,7 @@ find_matches :: (b: *Board) -> MatchMask {
|
||||
// unambiguously as the empty set. Suitable for snapshotting.
|
||||
dump_matches :: (b: *Board, m: *MatchMask) -> string {
|
||||
line_w := BOARD_COLS + 1; // 8 cells + newline
|
||||
buf := cstring(BOARD_ROWS * line_w);
|
||||
buf := alloc_string(BOARD_ROWS * line_w);
|
||||
for 0..BOARD_ROWS (row) {
|
||||
base := row * line_w;
|
||||
for 0..BOARD_COLS (col) {
|
||||
|
||||
Reference in New Issue
Block a user