X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fpipe%2Fpipe.psi;h=f0c0b1c43af268ffa908d82641eb364be11fd258;hb=c0bdd904aa881aab010c3fd8d859a787d4dd779b;hp=deb11d01711243d2787992287971386175780034;hpb=a7a2bb568d3ac79ce398941ab9231f0f9555bb22;p=m6w6%2Fext-psi diff --git a/tests/pipe/pipe.psi b/tests/pipe/pipe.psi index deb11d0..f0c0b1c 100644 --- a/tests/pipe/pipe.psi +++ b/tests/pipe/pipe.psi @@ -1,8 +1,9 @@ +lib "crypt"; -extern int pipe(int fds[2]); +#include function \pipe(array &$fds = null) : int { - return to_int(pipe); - let fds = calloc(2, 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)); }