cvs: ZendEngine2 / zend_operators.c

"Jani Taskinen" <[email protected]> Mon, 11 May 2009 00:45:09 -0000
Newsgroups gmane.comp.php.cvs.zend
Message-ID <cvsjani1242002709@cvsserver>
jani		Mon May 11 00:45:09 2009 UTC

  Modified files:              
    /ZendEngine2	zend_operators.c 
  Log:
  - And more CS fixes
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_operators.c?r1=1.305&r2=1.306&diff_format=u
Index: ZendEngine2/zend_operators.c
diff -u ZendEngine2/zend_operators.c:1.305 ZendEngine2/zend_operators.c:1.306
--- ZendEngine2/zend_operators.c:1.305	Mon May 11 00:40:10 2009
+++ ZendEngine2/zend_operators.c	Mon May 11 00:45:09 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_operators.c,v 1.305 2009/05/11 00:40:10 jani Exp $ */
+/* $Id: zend_operators.c,v 1.306 2009/05/11 00:45:09 jani Exp $ */
 
 #include <ctype.h>
 
@@ -284,7 +284,7 @@
 				break;												\
 			case IS_UNICODE:										\
 				Z_LVAL(holder) = zend_u_strtol(Z_USTRVAL_P(op), NULL, 10);	\
-				break;											  \
+				break;												\
 			case IS_ARRAY:											\
 				Z_LVAL(holder) = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0);	\
 				break;												\
@@ -339,8 +339,8 @@
 					Z_LVAL(holder) = 0;								\
 				} else {											\
 					Z_LVAL(holder) = 1;								\
-				}												   \
-				break;											  \
+				}													\
+				break;												\
 			case IS_ARRAY:											\
 				Z_LVAL(holder) = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0);	\
 				break;												\
@@ -365,17 +365,17 @@
 		zval dst;																			\
 		if (Z_OBJ_HT_P(op)->cast_object(op, &dst, ctype, NULL TSRMLS_CC) == FAILURE) {		\
 			zend_error(E_RECOVERABLE_ERROR, 												\
-			"Object of class %v could not be converted to %s", Z_OBJCE_P(op)->name,			\
-			zend_get_type_by_const(ctype));													\
+				"Object of class %v could not be converted to %s", Z_OBJCE_P(op)->name,		\
+				zend_get_type_by_const(ctype));												\
 		} else {																			\
 			zval_dtor(op);																	\
 			Z_TYPE_P(op) = ctype;															\
 			op->value = dst.value;															\
 		}																					\
 	} else {																				\
-		if(Z_OBJ_HT_P(op)->get) {															\
+		if (Z_OBJ_HT_P(op)->get) {															\
 			zval *newop = Z_OBJ_HT_P(op)->get(op TSRMLS_CC);								\
-			if(Z_TYPE_P(newop) != IS_OBJECT) {												\
+			if (Z_TYPE_P(newop) != IS_OBJECT) {												\
 				/* for safety - avoid loop */												\
 				zval_dtor(op);																\
 				*op = *newop;																\
@@ -810,13 +810,13 @@
 	/* if decimal point position is less than precision, cut zeros only in fractional part */
 	if (decpt <= ndigit) {
 		i = ndigit - 1;
-		while (i > 0 && i >= decpt && p1[i] == (UChar) 0x30  /*'0'*/) {
+		while (i > 0 && i >= decpt && p1[i] == (UChar) 0x30 /*'0'*/) {
 			ndigit--;
 			i--;
 		}
 	} else {
 	/* otherwise cut all trailing zeros */
-		for (i = ndigit - 1; i > 0 && p1[i] == (UChar) 0x30  /*'0'*/; i--) {
+		for (i = ndigit - 1; i > 0 && p1[i] == (UChar) 0x30 /*'0'*/; i--) {
 			ndigit--;
 		}
 	}
@@ -950,8 +950,8 @@
 				zval dst;
 				if (Z_OBJ_HT_P(op)->cast_object(op, &dst, IS_UNICODE, conv TSRMLS_CC) == FAILURE) {
 					zend_error(E_RECOVERABLE_ERROR,
-							   "Object of class %v could not be converted to %s", Z_OBJCE_P(op)->name,
-							   zend_get_type_by_const(IS_UNICODE));
+						"Object of class %v could not be converted to %s",
+						Z_OBJCE_P(op)->name, zend_get_type_by_const(IS_UNICODE));
 				} else {
 					zval_dtor(op);
 					Z_TYPE_P(op) = IS_UNICODE;
@@ -959,9 +959,9 @@
 					retval = SUCCESS;
 				}
 			} else {
-				if(Z_OBJ_HT_P(op)->get) {
+				if (Z_OBJ_HT_P(op)->get) {
 					zval *newop = Z_OBJ_HT_P(op)->get(op TSRMLS_CC);
-					if(Z_TYPE_P(newop) != IS_OBJECT) {
+					if (Z_TYPE_P(newop) != IS_OBJECT) {
 						/* for safety - avoid loop */
 						zval_dtor(op);
 						*op = *newop;
@@ -1058,8 +1058,8 @@
 				zval dst;
 				if (Z_OBJ_HT_P(op)->cast_object(op, &dst, IS_STRING, conv TSRMLS_CC) == FAILURE) {
 					zend_error(E_RECOVERABLE_ERROR,
-							   "Object of class %v could not be converted to %s", Z_OBJCE_P(op)->name,
-							   zend_get_type_by_const(IS_STRING));
+						"Object of class %v could not be converted to %s",
+						Z_OBJCE_P(op)->name, zend_get_type_by_const(IS_STRING));
 				} else {
 					zval_dtor(op);
 					Z_TYPE_P(op) = IS_STRING;
@@ -1067,9 +1067,9 @@
 					retval = SUCCESS;
 				}
 			} else {
-				if(Z_OBJ_HT_P(op)->get) {
+				if (Z_OBJ_HT_P(op)->get) {
 					zval *newop = Z_OBJ_HT_P(op)->get(op TSRMLS_CC);
-					if(Z_TYPE_P(newop) != IS_OBJECT) {
+					if (Z_TYPE_P(newop) != IS_OBJECT) {
 						/* for safety - avoid loop */
 						zval_dtor(op);
 						*op = *newop;
@@ -2012,8 +2012,7 @@
 						ret = compare_function(result, op_free, op2 TSRMLS_CC);
 						zend_free_obj_get_result(op_free TSRMLS_CC);
 						return ret;
-					} else if (Z_TYPE_P(op2) != IS_OBJECT &&
-							   Z_OBJ_HT_P(op1)->cast_object) {
+					} else if (Z_TYPE_P(op2) != IS_OBJECT && Z_OBJ_HT_P(op1)->cast_object) {
 						ALLOC_INIT_ZVAL(op_free);
 						if (Z_OBJ_HT_P(op1)->cast_object(op1, op_free, Z_TYPE_P(op2), NULL TSRMLS_CC) == FAILURE) {
 							ZVAL_LONG(result, 1);
@@ -2031,8 +2030,7 @@
 						ret = compare_function(result, op1, op_free TSRMLS_CC);
 						zend_free_obj_get_result(op_free TSRMLS_CC);
 						return ret;
-					} else if (Z_TYPE_P(op1) != IS_OBJECT &&
-							   Z_OBJ_HT_P(op2)->cast_object) {
+					} else if (Z_TYPE_P(op1) != IS_OBJECT && Z_OBJ_HT_P(op2)->cast_object) {
 						ALLOC_INIT_ZVAL(op_free);
 						if (Z_OBJ_HT_P(op2)->cast_object(op2, op_free, Z_TYPE_P(op1), NULL TSRMLS_CC) == FAILURE) {
 							ZVAL_LONG(result, -1);
@@ -2163,11 +2161,11 @@
 
 ZEND_API int is_not_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
 {
-   if (is_identical_function(result, op1, op2 TSRMLS_CC) == FAILURE) {
-	  return FAILURE;
-   }
-   Z_LVAL_P(result) = !Z_LVAL_P(result);
-   return SUCCESS;
+	if (is_identical_function(result, op1, op2 TSRMLS_CC) == FAILURE) {
+		return FAILURE;
+	}
+	Z_LVAL_P(result) = !Z_LVAL_P(result);
+	return SUCCESS;
 }
 /* }}} */
 



-- 
Zend Engine CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php