X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fpipe%2Fpipe.psi;h=f0c0b1c43af268ffa908d82641eb364be11fd258;hb=f077a911ab3d74c43a6316d745e885446820e7bf;hp=24c572381125c9108179c84c99f1c521c222e33c;hpb=6666c904bfd76dee4b0d7395de81ce1cf88edf2f;p=m6w6%2Fext-psi diff --git a/tests/pipe/pipe.psi b/tests/pipe/pipe.psi index 24c5723..f0c0b1c 100644 --- a/tests/pipe/pipe.psi +++ b/tests/pipe/pipe.psi @@ -1,8 +1,9 @@ +lib "crypt"; -// extern int pipe(int fildes[2]); +#include function \pipe(array &$fds = null) : int { - return to_int(pipe); - let fildes = calloc(2, psi\SIZEOF_INT); - set $fds = to_array(fildes[2]); + return pipe(fildes) as to_int(pipe); + let fildes = calloc(2, sizeof(int)); + set $fds = to_array(*fildes, 2, to_int(*fildes)); }