cvs: ZendEngine2(PHP_5_3) / zend_execute.c
"Dmitry Stogov" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.zend |
|---|---|
| Message-ID | <cvsdmitry1214918448@cvsserver> |
dmitry Tue Jul 1 13:20:48 2008 UTC
Modified files: (Branch: PHP_5_3)
/ZendEngine2 zend_execute.c
Log:
Removed redundant code
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.12.2.24.2.30&r2=1.716.2.12.2.24.2.31&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.30 ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.31
--- ZendEngine2/zend_execute.c:1.716.2.12.2.24.2.30 Wed Jun 11 13:18:39 2008
+++ ZendEngine2/zend_execute.c Tue Jul 1 13:20:48 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.30 2008/06/11 13:18:39 dmitry Exp $ */
+/* $Id: zend_execute.c,v 1.716.2.12.2.24.2.31 2008/07/01 13:20:48 dmitry Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -1047,18 +1047,7 @@
switch (Z_TYPE_P(container)) {
case IS_ARRAY:
- if (dim == NULL) {
- zval *new_zval = &EG(uninitialized_zval);
-
- Z_ADDREF_P(new_zval);
- if (zend_hash_next_index_insert(Z_ARRVAL_P(container), &new_zval, sizeof(zval *), (void **) &retval) == FAILURE) {
- zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied");
- retval = &EG(error_zval_ptr);
- Z_DELREF_P(new_zval);
- }
- } else {
- retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, type TSRMLS_CC);
- }
+ retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, type TSRMLS_CC);
if (result) {
AI_SET_PTR(result->var, *retval);
PZVAL_LOCK(*retval);
@@ -1082,10 +1071,6 @@
case IS_STRING: {
zval tmp;
- if (dim == NULL) {
- zend_error_noreturn(E_ERROR, "[] operator not supported for strings");
- }
-
if (Z_TYPE_P(dim) != IS_LONG) {
switch(Z_TYPE_P(dim)) {
/* case IS_LONG: */
--
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php