diff options
| author | Marcus Boerger <helly@php.net> | 2007-01-16 20:36:04 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2007-01-16 20:36:04 +0000 |
| commit | 1c604063493597ca2183d6890df5acc38a865add (patch) | |
| tree | a8bf6c0d6110ebe47b3efd058ae4783a7a353f88 /main/streams/streams.c | |
| parent | a7a94371995996733ca14674e10e5fbb37667f99 (diff) | |
| download | php-git-1c604063493597ca2183d6890df5acc38a865add.tar.gz | |
- Add more unicode stuff
Diffstat (limited to 'main/streams/streams.c')
| -rwxr-xr-x | main/streams/streams.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index f7ed82cf9d..b521dcae86 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -2278,6 +2278,27 @@ PHPAPI php_stream *_php_stream_opendir(char *path, int options, } /* }}} */ +PHPAPI php_stream *_php_stream_u_opendir(zend_uchar type, zstr path, int path_len, int options, php_stream_context *context STREAMS_DC TSRMLS_DC) /* {{{ */ +{ + char *filename; + int filename_len; + php_stream *stream; + + if (type == IS_STRING) { + return php_stream_opendir(path.s, options, context); + } + + /* type == IS_UNICODE */ + if (FAILURE == php_stream_path_encode(NULL, &filename, &filename_len, path.u, path_len, options, context)) { + return NULL; + } + + stream = php_stream_opendir(filename, options, context); + efree(filename); + return stream; +} +/* }}} */ + /* {{{ _php_stream_readdir */ PHPAPI php_stream_dirent *_php_stream_readdir(php_stream *dirstream, php_stream_dirent *ent TSRMLS_DC) { |
