maintainer mode only makes deps now
[m6w6/ext-psi] / tests / pipe / pipe.psi
index 6fc9e89aee5b2f64760aa7b9e1781f1d07026129..568fc262f9b8292153a70bb16809c1c892ce36cb 100644 (file)
@@ -1,8 +1,7 @@
-
-//extern int pipe(int fildes[2]);
+#include <unistd.h>
 
 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));
 }