1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

js,os: fix integer arithmetic; add Process.close() and os.is_readable() for VJS; Make tetris run on JS backend (#12940)

This commit is contained in:
playX
2021-12-23 12:36:42 +03:00
committed by GitHub
parent d3ccdfd75c
commit a2468e1e0c
7 changed files with 535 additions and 3 deletions

View File

@ -26,7 +26,6 @@ fn (mut p Process) spawn_internal() {
#p.val.pid.on('error', function (err) { builtin.panic('Failed to start subprocess') })
p.status = .running
// todo(playX): stderr,stdin
if p.use_stdio_ctl {
#p.val.pid.stdout.pipe(process.stdout)
#p.val.pid.stdin.pipe(process.stdin)
@ -121,3 +120,7 @@ fn (mut p Process) check_redirection_call(fn_name string) {
panic('Call p.${fn_name}() after you have called p.run()')
}
}
pub fn (mut p Process) close() {
// no-op on JS backend
}