parser: consolidate tokens
[m6w6/ext-psi] / psi.d / glob.psi
index f4a762a729e1a0bfbac6e1877954d12abf449486..8fc3b0b31c0302a728338c47034a66a42573ff5d 100644 (file)
@@ -14,7 +14,7 @@ function psi\glob(string $pattern, int $flags, array &$glob = NULL, callable $er
                        strval($gl_pathv)
                )
        );
-       return to_int(glob);
+       return glob(path, flags, err, buf) as to_int(glob);
        set $glob = to_array(*buf,
                to_int(gl_matchc),
                to_int(gl_pathc),
@@ -22,5 +22,4 @@ function psi\glob(string $pattern, int $flags, array &$glob = NULL, callable $er
                to_int(gl_flags),
                to_array(*gl_pathv, gl_pathc + gl_offs, to_string(*gl_pathv))
        );
-       free globfree(buf);
 }