diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-08-31 16:15:24 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-08-31 16:15:24 +0000 |
| commit | 75b8cd741ba23dbf1ae75b50484d69d1aa70e7f3 (patch) | |
| tree | 156e407d75b817b93b87b74690d0b0fac7ac79c4 /ext/posix | |
| parent | 50e9994b2c36eae24de34c4c5088f4bd9686fe07 (diff) | |
| download | php-git-75b8cd741ba23dbf1ae75b50484d69d1aa70e7f3.tar.gz | |
last portion of z/Z fixes
Diffstat (limited to 'ext/posix')
| -rw-r--r-- | ext/posix/posix.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ext/posix/posix.c b/ext/posix/posix.c index b8b6bafd06..418f1f1a6b 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -552,23 +552,23 @@ static int php_posix_stream_get_fd(zval *zfp, int *fd TSRMLS_DC) Determine terminal device name (POSIX.1, 4.7.2) */ PHP_FUNCTION(posix_ttyname) { - zval *z_fd; + zval **z_fd; char *p; int fd; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &z_fd) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &z_fd) == FAILURE) { RETURN_FALSE; } - switch (Z_TYPE_P(z_fd)) { + switch (Z_TYPE_PP(z_fd)) { case IS_RESOURCE: - if (!php_posix_stream_get_fd(z_fd, &fd TSRMLS_CC)) { + if (!php_posix_stream_get_fd(*z_fd, &fd TSRMLS_CC)) { RETURN_FALSE; } break; default: - convert_to_long(z_fd); - fd = Z_LVAL_P(z_fd); + convert_to_long_ex(z_fd); + fd = Z_LVAL_PP(z_fd); } if (NULL == (p = ttyname(fd))) { @@ -584,22 +584,22 @@ PHP_FUNCTION(posix_ttyname) Determine if filedesc is a tty (POSIX.1, 4.7.1) */ PHP_FUNCTION(posix_isatty) { - zval *z_fd; + zval **z_fd; int fd; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &z_fd) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &z_fd) == FAILURE) { RETURN_FALSE; } - switch (Z_TYPE_P(z_fd)) { + switch (Z_TYPE_PP(z_fd)) { case IS_RESOURCE: - if (!php_posix_stream_get_fd(z_fd, &fd TSRMLS_CC)) { + if (!php_posix_stream_get_fd(*z_fd, &fd TSRMLS_CC)) { RETURN_FALSE; } break; default: - convert_to_long(z_fd); - fd = Z_LVAL_P(z_fd); + convert_to_long_ex(z_fd); + fd = Z_LVAL_PP(z_fd); } if (isatty(fd)) { |
