X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=psi.d%2Fglob.psi;h=5e6d21534d452d34c36304878dfb533dbd06f16c;hp=19aa6cb951b02676eda1b74c3ba3ec99bec9c810;hb=5eb675460ea7908245fc97f4a9622e6115d7d601;hpb=a78817d6e2da0be5942dd8e1d334789e9e88ffa3 diff --git a/psi.d/glob.psi b/psi.d/glob.psi index 19aa6cb..5e6d215 100644 --- a/psi.d/glob.psi +++ b/psi.d/glob.psi @@ -5,14 +5,21 @@ function psi\glob(string $pattern, int $flags, array &$glob = NULL, callable $er to_string(epath), to_int(eerrno) )); - let buf = &arrval($glob); + let buf = &arrval($glob, + intval($gl_matchc), + intval($gl_pathc), + intval($gl_offs), + intval($gl_flags), + &arrval($gl_pathv, + strval($gl_pathv) + ) + ); return to_int(glob); set $glob = to_array(*buf, to_int(gl_matchc), to_int(gl_pathc), to_int(gl_offs), to_int(gl_flags), - to_array(gl_pathv, gl_pathc + gl_offs, to_string(gl_pathv)) + to_array(*gl_pathv, gl_pathc + gl_offs, to_string(*gl_pathv)) ); - free globfree(buf); }