diff options
author | Anatol Belski <ab@php.net> | 2014-08-16 11:37:14 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-16 11:37:14 +0200 |
commit | cb25136f4ef1042295650475b2c20ace81e2b9b7 (patch) | |
tree | 9d6a509c80f2ac1e094cd9d42772654781a79715 /ext/standard/proc_open.c | |
parent | f790043e30513c56f108289ec44ea6eb493f7773 (diff) | |
download | php-git-cb25136f4ef1042295650475b2c20ace81e2b9b7.tar.gz |
fix macros in the 5 basic extensions
Diffstat (limited to 'ext/standard/proc_open.c')
-rw-r--r-- | ext/standard/proc_open.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index dea8c16c07..84986c2e03 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -300,7 +300,7 @@ PHP_FUNCTION(proc_close) FG(pclose_wait) = 1; zend_list_close(Z_RES_P(zproc)); FG(pclose_wait) = 0; - RETURN_LONG(FG(pclose_ret)); + RETURN_INT(FG(pclose_ret)); } /* }}} */ @@ -328,7 +328,7 @@ PHP_FUNCTION(proc_get_status) array_init(return_value); add_assoc_string(return_value, "command", proc->command); - add_assoc_long(return_value, "pid", (long) proc->child); + add_assoc_int(return_value, "pid", (long) proc->child); #ifdef PHP_WIN32 @@ -368,9 +368,9 @@ PHP_FUNCTION(proc_get_status) add_assoc_bool(return_value, "running", running); add_assoc_bool(return_value, "signaled", signaled); add_assoc_bool(return_value, "stopped", stopped); - add_assoc_long(return_value, "exitcode", exitcode); - add_assoc_long(return_value, "termsig", termsig); - add_assoc_long(return_value, "stopsig", stopsig); + add_assoc_int(return_value, "exitcode", exitcode); + add_assoc_int(return_value, "termsig", termsig); + add_assoc_int(return_value, "stopsig", stopsig); } /* }}} */ @@ -471,14 +471,14 @@ PHP_FUNCTION(proc_open) if (other_options) { zval *item = zend_hash_str_find(Z_ARRVAL_P(other_options), "suppress_errors", sizeof("suppress_errors") - 1); if (item != NULL) { - if (Z_TYPE_P(item) == IS_TRUE || ((Z_TYPE_P(item) == IS_LONG) && Z_LVAL_P(item))) { + if (Z_TYPE_P(item) == IS_TRUE || ((Z_TYPE_P(item) == IS_INT) && Z_IVAL_P(item))) { suppress_errors = 1; } } item = zend_hash_str_find(Z_ARRVAL_P(other_options), "bypass_shell", sizeof("bypass_shell") - 1); if (item != NULL) { - if (Z_TYPE_P(item) == IS_TRUE || ((Z_TYPE_P(item) == IS_LONG) && Z_LVAL_P(item))) { + if (Z_TYPE_P(item) == IS_TRUE || ((Z_TYPE_P(item) == IS_INT) && Z_IVAL_P(item))) { bypass_shell = 1; } } @@ -584,7 +584,7 @@ PHP_FUNCTION(proc_open) #endif descriptors[ndesc].mode_flags = descriptors[ndesc].mode & DESC_PARENT_MODE_WRITE ? O_WRONLY : O_RDONLY; #ifdef PHP_WIN32 - if (Z_STRLEN_P(zmode) >= 2 && Z_STRVAL_P(zmode)[1] == 'b') + if (Z_STRSIZE_P(zmode) >= 2 && Z_STRVAL_P(zmode)[1] == 'b') descriptors[ndesc].mode_flags |= O_BINARY; #endif |