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; \
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; \
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; \
/* 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--;
}
}
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;
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;
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;
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;
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);
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);
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;
}
/* }}} */