diff options
| author | Zuhaitz <zuhaitz.zechhub@gmail.com> | 2026-02-02 00:22:19 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-02 00:22:19 +0000 |
| commit | 6fde408251dcc0e32c6f513b5d65cc7a9d8c8912 (patch) | |
| tree | a50440a6148113ebf0e017da8111338e8e067a31 /std/process.zc | |
| parent | c4b73a1e99bda3cdfabe7ff3b64066b310ee7292 (diff) | |
| parent | fb57d746d706fbae822de17087f4a3991d3079cb (diff) | |
Merge branch 'main' into dev/weilun/thread
Diffstat (limited to 'std/process.zc')
| -rw-r--r-- | std/process.zc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/std/process.zc b/std/process.zc index 3ce43b6..9f432c0 100644 --- a/std/process.zc +++ b/std/process.zc @@ -9,7 +9,7 @@ include <stdio.h> include <stdlib.h> // system() can be externed directly with const char* -extern fn system(command: const char*) -> int; +extern fn system(command: const char*) -> c_int; // Minimal raw block: only for opaque FILE* types // popen/pclose/fgets use FILE* which conflicts with void* @@ -28,8 +28,8 @@ raw { } extern fn _z_popen(command: const char*, type: const char*) -> void*; -extern fn _z_pclose(stream: void*) -> int; -extern fn _z_fgets(s: char*, size: int, stream: void*) -> char*; +extern fn _z_pclose(stream: void*) -> c_int; +extern fn _z_fgets(s: char*, size: c_int, stream: void*) -> char*; struct Output { stdout: String; @@ -88,7 +88,7 @@ impl Command { let buf = (char*)malloc(buf_size); while (true) { - let res = _z_fgets(buf, (int)buf_size, fp); + let res = _z_fgets(buf, (c_int)buf_size, fp); if (res == 0) break; let chunk = String::from(buf); |
