tony2001 Fri Jul 13 08:50:53 2007 UTC
Modified files:
/php-src/ext/standard basic_functions.c
Log:
simplify the patch and prevent NULL retval_ptr_ptr's
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.865&r2=1.866&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.865
php-src/ext/standard/basic_functions.c:1.866
--- php-src/ext/standard/basic_functions.c:1.865 Thu Jul 12 09:19:04 2007
+++ php-src/ext/standard/basic_functions.c Fri Jul 13 08:50:53 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.865 2007/07/12 09:19:04 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.866 2007/07/13 08:50:53 tony2001 Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -5042,10 +5042,8 @@
fci.retval_ptr_ptr = &retval_ptr;
- if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS) {
- *return_value = **fci.retval_ptr_ptr;
- zval_copy_ctor(return_value);
- zval_ptr_dtor(fci.retval_ptr_ptr);
+ if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS &&
fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
+ COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
}
if (fci.params) {
@@ -5069,10 +5067,8 @@
zend_fcall_info_args(&fci, params TSRMLS_CC);
fci.retval_ptr_ptr = &retval_ptr;
- if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS) {
- *return_value = **fci.retval_ptr_ptr;
- zval_copy_ctor(return_value);
- zval_ptr_dtor(fci.retval_ptr_ptr);
+ if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS &&
fci.retval_ptr_ptr && *fci.retval_ptr_ptr) {
+ COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr);
}
zend_fcall_info_args_clear(&fci, 1);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php