X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=tests%2Fpipe%2Fpipe.psi;h=f0c0b1c43af268ffa908d82641eb364be11fd258;hp=6fc9e89aee5b2f64760aa7b9e1781f1d07026129;hb=469252910524ae30fe24febab9bec3f058e37c1e;hpb=d3171526ab7658114cac4ebe1098af4b038e576e diff --git a/tests/pipe/pipe.psi b/tests/pipe/pipe.psi index 6fc9e89..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)); }