deduct variable names from implementation
[m6w6/ext-psi] / tests / pipe / pipe.psi
index fd7e3ff1770e975a7e8ce4763acf2daa8432235b..c7b2e73347d1a9760c28261bb961bff5a52058f6 100644 (file)
@@ -1,8 +1,8 @@
 
-extern int pipe(int fds[2]);
+// extern int pipe(int fildes[2]);
 
 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, psi\SIZEOF_INT);
+       set $fds = to_array(*fildes, 2, to_int(*fildes));
 }