projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
travis trusty
[m6w6/ext-psi]
/
psi.d
/
glob.psi
diff --git
a/psi.d/glob.psi
b/psi.d/glob.psi
index ce6f5a72c3510a2758c63e5533e3203b545952d3..61ada04bb65c7f0f41d9360c0ed8de1fff958d6c 100644
(file)
--- a/
psi.d/glob.psi
+++ b/
psi.d/glob.psi
@@
-1,8
+1,11
@@
-function psi\glob(string $pattern, int $flags, array &$glob = NULL) : int {
+function psi\glob(string $pattern, int $flags, array &$glob = NULL
, callable $errfn = NULL
) : int {
let path = strval($pattern);
let flags = intval($flags);
let path = strval($pattern);
let flags = intval($flags);
- let err = NULL;
- let buf = arrval($glob);
+ let err = callback intval($errfn(
+ to_string(errmsg),
+ to_int(errno)
+ ));
+ let buf = &arrval($glob);
return to_int(glob);
set $glob = to_array(*buf,
to_int(gl_matchc),
return to_int(glob);
set $glob = to_array(*buf,
to_int(gl_matchc),