raz / commit f9222ab9

commit
f9222ab92ff15cddbbfafe0a29adc7feafe93cd4
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
46ec3b9f
The report: Sys.workDir returns the directory (2026-10.8)

At the owner's word, several results in place of var parameters where
they fit: workDir's buffer was its result.

patch · log

1 file changed, +4 -2

doc/raz.md (history) modified +4 -2

@@ -9,7 +9,7 @@
99 This report defines the language. It is short on purpose. Whatever it
1010 doesn't allow, raz doesn't have.
1111
12-This is version 2026-10.7 of the report; section 12 says what each
12+This is version 2026-10.8 of the report; section 12 says what each
1313 version changed.
1414
1515 ## 1. A first look
@@ -976,7 +976,7 @@
976976 proc ready*(fd: I64; ms: I64): BOOL; (* something to read within ms, or ever if ms < 0 *)
977977
978978 proc env*(name: []U8): []U8; (* the environment variable's value; "" if unset *)
979-proc workDir*(var buf: [4096]U8): I64; (* the working directory into buf: its length *)
979+proc workDir*: ([]U8, I64); (* the working directory, good until the next call *)
980980
981981 proc connect*(path: []U8): I64; (* a stream socket, connected to the Unix socket at path: its fd *)
982982 proc send*(fd: I64; s: []U8): I64; (* write, to a socket: -32 (EPIPE), not a signal, if it is closed *)
@@ -1083,3 +1083,5 @@
10831083 and whether it is a symbolic link (section 11).
10841084 - **2026-10.7.** `Sys.send` writes to a socket without SIGPIPE
10851085 (section 11).
1086+- **2026-10.8.** `Sys.workDir` returns the directory, with no `var`
1087+ parameter (section 11).