X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fpipe%2Fpipe.psi;h=aab776d379bfe7884026d7ab386dd03e2d5f03a4;hb=4bf8ff5e477da2fa4f82518bb947055c2c0374d6;hp=fd7e3ff1770e975a7e8ce4763acf2daa8432235b;hpb=58066949f02dbdbc3ba7b3fa3a0e01836fa72663;p=m6w6%2Fext-psi diff --git a/tests/pipe/pipe.psi b/tests/pipe/pipe.psi index fd7e3ff..aab776d 100644 --- a/tests/pipe/pipe.psi +++ b/tests/pipe/pipe.psi @@ -1,8 +1,9 @@ +#pragma lib "crypt" -extern int pipe(int fds[2]); +#include function \pipe(array &$fds = null) : int { - return to_int(pipe); - let fds = calloc(2, psi\SIZEOF_INT); - set $fds = to_array(fds[2]); + return pipe(fildes) as to_int(pipe); + let fildes = calloc(2, sizeof(int)); + set $fds = to_array(*fildes, 2, to_int(*fildes)); }