diff options
| author | Andi Gutmans <andi@php.net> | 2002-09-15 07:45:26 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2002-09-15 07:45:26 +0000 |
| commit | 43139dc7553956d57619f2429230d1ac6ad72fd4 (patch) | |
| tree | 082e26b0449ba3e974eeadd4ce28c69be94cf450 | |
| parent | fcc0ce7eec7288c3dd875d45f6d957b5b4b0b288 (diff) | |
| download | php-git-43139dc7553956d57619f2429230d1ac6ad72fd4.tar.gz | |
- WS - Always use "if (" and not "if("
| -rw-r--r-- | Zend/zend_API.c | 2 | ||||
| -rw-r--r-- | Zend/zend_builtin_functions.c | 10 | ||||
| -rw-r--r-- | Zend/zend_compile.c | 10 | ||||
| -rw-r--r-- | Zend/zend_execute.c | 46 | ||||
| -rw-r--r-- | Zend/zend_execute_API.c | 2 | ||||
| -rw-r--r-- | Zend/zend_ini.c | 4 | ||||
| -rw-r--r-- | Zend/zend_list.c | 3 | ||||
| -rw-r--r-- | Zend/zend_object_handlers.c | 32 | ||||
| -rw-r--r-- | Zend/zend_objects_API.c | 12 | ||||
| -rw-r--r-- | Zend/zend_operators.c | 16 |
10 files changed, 68 insertions, 69 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index f1acf85024..10f8f3477d 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -590,7 +590,7 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type } arg->type = IS_OBJECT; - if(class_type->create_object == NULL) { + if (class_type->create_object == NULL) { arg->value.obj = zend_objects_new(&object, class_type); if (properties) { object->properties = properties; diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 5a49e761f4..22afc71625 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -555,7 +555,7 @@ ZEND_FUNCTION(get_parent_class) } /* then try getting the class entry if successfull, will fall through to standard ce handling */ - if(!Z_OBJ_HT_PP(arg)->get_class_entry || !(ce = zend_get_class_entry(*arg))) { + if (!Z_OBJ_HT_PP(arg)->get_class_entry || !(ce = zend_get_class_entry(*arg))) { RETURN_FALSE; } } else if (Z_TYPE_PP(arg) == IS_STRING) { @@ -592,7 +592,7 @@ static void is_a_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool only_subclass) } /* TBI!! new object handlers */ - if(!HAS_CLASS_ENTRY(**obj)) { + if (!HAS_CLASS_ENTRY(**obj)) { RETURN_FALSE; } @@ -682,7 +682,7 @@ ZEND_FUNCTION(get_object_vars) if ((*obj)->type != IS_OBJECT) { RETURN_FALSE; } - if(Z_OBJ_HT_PP(obj)->get_properties == NULL) { + if (Z_OBJ_HT_PP(obj)->get_properties == NULL) { RETURN_FALSE; } @@ -710,7 +710,7 @@ ZEND_FUNCTION(get_class_methods) if (Z_TYPE_PP(class) == IS_OBJECT) { /* TBI!! new object handlers */ - if(!HAS_CLASS_ENTRY(**class)) { + if (!HAS_CLASS_ENTRY(**class)) { RETURN_FALSE; } ce = Z_OBJCE_PP(class); @@ -756,7 +756,7 @@ ZEND_FUNCTION(method_exists) } /* TBI!! new object handlers */ - if(!HAS_CLASS_ENTRY(**klass)) { + if (!HAS_CLASS_ENTRY(**klass)) { RETURN_FALSE; } diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 34d3e87608..8717ec856b 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -184,7 +184,7 @@ void zend_do_unary_op(zend_uchar op, znode *result, znode *op1 TSRMLS_DC) static void zend_replace_object_fetch(zend_op *last_op, znode *value TSRMLS_DC) { - if(value->op_type != IS_VAR) { + if (value->op_type != IS_VAR) { last_op->opcode = ZEND_MAKE_VAR; last_op->result.op_type = IS_VAR; last_op->result.u.EA.type = 0; @@ -205,7 +205,7 @@ void zend_do_binary_assign_op(zend_uchar op, znode *result, znode *op1, znode *o zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); - if(last_op->opcode == ZEND_FETCH_OBJ_RW) { + if (last_op->opcode == ZEND_FETCH_OBJ_RW) { switch(op) { case ZEND_ASSIGN_ADD: @@ -380,7 +380,7 @@ void zend_do_assign(znode *result, znode *variable, znode *value TSRMLS_DC) zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); - if(last_op->opcode == ZEND_FETCH_OBJ_W) { + if (last_op->opcode == ZEND_FETCH_OBJ_W) { opline->opcode = ZEND_ASSIGN_OBJ; opline->op1 = last_op->op1; opline->op2 = last_op->op2; @@ -523,7 +523,7 @@ void zend_do_pre_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); - if(last_op->opcode == ZEND_FETCH_OBJ_RW) { + if (last_op->opcode == ZEND_FETCH_OBJ_RW) { opline->opcode = (op==ZEND_PRE_INC)?ZEND_PRE_INC_OBJ:ZEND_PRE_DEC_OBJ; opline->op1 = last_op->op1; opline->op2 = last_op->op2; @@ -548,7 +548,7 @@ void zend_do_post_incdec(znode *result, znode *op1, zend_uchar op TSRMLS_DC) zend_op *last_op = &CG(active_op_array)->opcodes[last_op_number]; zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC); - if(last_op->opcode == ZEND_FETCH_OBJ_RW) { + if (last_op->opcode == ZEND_FETCH_OBJ_RW) { opline->opcode = (op==ZEND_POST_INC)?ZEND_POST_INC_OBJ:ZEND_POST_DEC_OBJ; opline->op1 = last_op->op1; opline->op2 = last_op->op2; diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index fb10e0eda0..31bac63094 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -159,11 +159,11 @@ static inline zval **zend_fetch_property_address_inner(zval *object, znode *op2, break; } - if(Z_OBJ_HT_P(object)->get_property_ptr != NULL) { + if (Z_OBJ_HT_P(object)->get_property_ptr != NULL) { retval = Z_OBJ_HT_P(object)->get_property_ptr(object, prop_ptr TSRMLS_CC); } - if(retval == NULL) { + if (retval == NULL) { zend_error(E_WARNING, "This object doesn't support property references"); retval = &EG(error_zval_ptr); } @@ -357,9 +357,9 @@ static inline void zend_assign_to_object_op(znode *result, znode *op1, znode *op /* here property is a string */ PZVAL_UNLOCK(value); - if(Z_OBJ_HT_P(object)->get_property_zval_ptr) { + if (Z_OBJ_HT_P(object)->get_property_zval_ptr) { zval **zptr = Z_OBJ_HT_P(object)->get_property_zval_ptr(object, property TSRMLS_CC); - if(zptr != NULL) { /* NULL means no success in getting PTR */ + if (zptr != NULL) { /* NULL means no success in getting PTR */ SEPARATE_ZVAL_IF_NOT_REF(zptr); have_get_ptr = 1; @@ -369,14 +369,14 @@ static inline void zend_assign_to_object_op(znode *result, znode *op1, znode *op } } - if(!have_get_ptr) { + if (!have_get_ptr) { zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_RW TSRMLS_CC); SEPARATE_ZVAL_IF_NOT_REF(&z); binary_op(z, z, value TSRMLS_CC); Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC); *retval = z; SELECTIVE_PZVAL_LOCK(*retval, result); - if(z->refcount <= 1) { + if (z->refcount <= 1) { zval_dtor(z); } } @@ -951,7 +951,7 @@ static void zend_fetch_property_address_read(znode *result, znode *op1, znode *o } - if(container->type != IS_OBJECT) { + if (container->type != IS_OBJECT) { zend_error(E_NOTICE, "Trying to get property of non-object"); if (type==BP_VAR_R || type==BP_VAR_IS) { @@ -1013,9 +1013,9 @@ static void zend_pre_incdec_property(znode *result, znode *op1, znode *op2, temp /* here we are sure we are dealing with an object */ - if(Z_OBJ_HT_P(object)->get_property_zval_ptr) { + if (Z_OBJ_HT_P(object)->get_property_zval_ptr) { zval **zptr = Z_OBJ_HT_P(object)->get_property_zval_ptr(object, property TSRMLS_CC); - if(zptr != NULL) { /* NULL means no success in getting PTR */ + if (zptr != NULL) { /* NULL means no success in getting PTR */ SEPARATE_ZVAL_IF_NOT_REF(zptr); have_get_ptr = 1; @@ -1025,12 +1025,12 @@ static void zend_pre_incdec_property(znode *result, znode *op1, znode *op2, temp } } - if(!have_get_ptr) { + if (!have_get_ptr) { zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_RW TSRMLS_CC); SEPARATE_ZVAL_IF_NOT_REF(&z); incdec_op(z); Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC); - if(z->refcount <= 1) { + if (z->refcount <= 1) { zval_dtor(z); } } @@ -1058,9 +1058,9 @@ static void zend_post_incdec_property(znode *result, znode *op1, znode *op2, tem /* here we are sure we are dealing with an object */ - if(Z_OBJ_HT_P(object)->get_property_zval_ptr) { + if (Z_OBJ_HT_P(object)->get_property_zval_ptr) { zval **zptr = Z_OBJ_HT_P(object)->get_property_zval_ptr(object, property TSRMLS_CC); - if(zptr != NULL) { /* NULL means no success in getting PTR */ + if (zptr != NULL) { /* NULL means no success in getting PTR */ have_get_ptr = 1; SEPARATE_ZVAL_IF_NOT_REF(zptr); @@ -1072,14 +1072,14 @@ static void zend_post_incdec_property(znode *result, znode *op1, znode *op2, tem } } - if(!have_get_ptr) { + if (!have_get_ptr) { zval *z = Z_OBJ_HT_P(object)->read_property(object, property, BP_VAR_RW TSRMLS_CC); SEPARATE_ZVAL_IF_NOT_REF(&z); *retval = *z; zendi_zval_copy_ctor(*retval); incdec_op(z); Z_OBJ_HT_P(object)->write_property(object, property, z TSRMLS_CC); - if(z->refcount <= 1) { + if (z->refcount <= 1) { zval_dtor(z); } } @@ -1884,7 +1884,7 @@ binary_assign_op_addr_obj: } EX(fbc) = EX(fbc_constructor); - if(EX(fbc)->type == ZEND_USER_FUNCTION) { /* HACK!! */ + if (EX(fbc)->type == ZEND_USER_FUNCTION) { /* HACK!! */ /* The scope should be the scope of the class where the constructor was initially declared in */ EX(calling_scope) = EX(fbc)->common.scope; @@ -1937,7 +1937,7 @@ binary_assign_op_addr_obj: EX(object) = this_ptr; } - if(EX(fbc)->type == ZEND_USER_FUNCTION) { + if (EX(fbc)->type == ZEND_USER_FUNCTION) { EX(calling_scope) = EX(fbc)->common.scope; } else { EX(calling_scope) = NULL; @@ -2150,7 +2150,7 @@ do_fcall_common: ALLOC_ZVAL(EX(Ts)[EX(opline)->result.u.var].var.ptr); INIT_ZVAL(*(EX(Ts)[EX(opline)->result.u.var].var.ptr)); - if(EX(object)) { + if (EX(object)) { Z_OBJ_HT_P(EX(object))->call_method(EX(fbc)->common.function_name, EX(opline)->extended_value, EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object), return_value_used TSRMLS_CC); } else { zend_error(E_ERROR, "Cannot call overloaded function for non-object"); @@ -2697,7 +2697,7 @@ send_by_ref: file_handle.free_filename = 0; if (file_handle.handle.fp) { - if( !opened_path ) { + if (!opened_path) { opened_path = file_handle.opened_path = estrndup(inc_filename->value.str.val, inc_filename->value.str.len); } @@ -2815,11 +2815,11 @@ send_by_ref: if (container) { HashTable *ht; - if((*container)->type == IS_ARRAY) { + if ((*container)->type == IS_ARRAY) { ht = (*container)->value.ht; } else { ht = NULL; - if((*container)->type == IS_OBJECT) { + if ((*container)->type == IS_OBJECT) { Z_OBJ_HT_P(*container)->unset_property(*container, offset TSRMLS_CC); } } @@ -3014,7 +3014,7 @@ send_by_ref: if (container) { - if((*container)->type == IS_ARRAY) { + if ((*container)->type == IS_ARRAY) { HashTable *ht; int isset = 0; @@ -3071,7 +3071,7 @@ send_by_ref: break; } } else { - if((*container)->type == IS_OBJECT) { + if ((*container)->type == IS_OBJECT) { result = Z_OBJ_HT_P(*container)->has_property(*container, offset, (EX(opline)->extended_value == ZEND_ISEMPTY) TSRMLS_CC); } } diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 4ccb9dd56c..b606d416d8 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -514,7 +514,7 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun if (object_pp) { /* TBI!! new object handlers */ if (Z_TYPE_PP(object_pp) == IS_OBJECT) { - if(!IS_ZEND_STD_OBJECT(**object_pp)) { + if (!IS_ZEND_STD_OBJECT(**object_pp)) { zend_error(E_WARNING, "Cannot use call_user_function on overloaded objects"); return FAILURE; } diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index cfeae83363..afed2a53c2 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -307,7 +307,7 @@ static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type) display_string = ini_entry->orig_value; display_string_length = ini_entry->orig_value_length; } else { - if(zend_uv.html_errors) { + if (zend_uv.html_errors) { display_string = NO_VALUE_HTML; display_string_length = sizeof(NO_VALUE_HTML)-1; } else { @@ -319,7 +319,7 @@ static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type) display_string = ini_entry->value; display_string_length = ini_entry->value_length; } else { - if(zend_uv.html_errors) { + if (zend_uv.html_errors) { display_string = NO_VALUE_HTML; display_string_length = sizeof(NO_VALUE_HTML)-1; } else { diff --git a/Zend/zend_list.c b/Zend/zend_list.c index 0bae054bab..7c737e41fc 100644 --- a/Zend/zend_list.c +++ b/Zend/zend_list.c @@ -233,7 +233,6 @@ void zend_destroy_rsrc_list(HashTable *ht TSRMLS_DC) zend_hash_graceful_reverse_destroy(ht); } - static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id TSRMLS_DC) { if (le->type == *resource_id) { @@ -315,7 +314,7 @@ ZEND_API int zend_fetch_list_dtor_id(char *type_name) zend_hash_internal_pointer_reset_ex(&list_destructors, &pos); while(zend_hash_get_current_data_ex(&list_destructors, (void **)&lde, &pos) == SUCCESS) { - if(strcmp(type_name, lde->type_name) == 0) { + if (strcmp(type_name, lde->type_name) == 0) { #if 0 printf("Found resource id %d for resource type %s\n", (*lde).resource_id, type_name); #endif diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 9aa977bda2..106dd18f86 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -64,7 +64,7 @@ static zval *zend_std_call_getter(zval *object, zval *member TSRMLS_DC) */ - if(call_result == FAILURE) { + if (call_result == FAILURE) { zend_error(E_ERROR, "Could not call __get handler for class %s", Z_OBJCE_P(object)->name); return NULL; } @@ -109,7 +109,7 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D */ - if(call_result == FAILURE) { + if (call_result == FAILURE) { zend_error(E_ERROR, "Could not call __set handler for class %s", Z_OBJCE_P(object)->name); return FAILURE; } @@ -122,7 +122,7 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D ret = FAILURE; } - if(retval) { + if (retval) { zval_ptr_dtor(&retval); } @@ -150,13 +150,13 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC) #endif if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &retval) == FAILURE) { - if(zobj->ce->__get && !zobj->in_get) { + if (zobj->ce->__get && !zobj->in_get) { /* have getter - try with it! */ zobj->in_get = 1; /* prevent circular getting */ rv = zend_std_call_getter(object, member TSRMLS_CC); zobj->in_get = 0; - if(rv) { + if (rv) { retval = &rv; } else { retval = &EG(uninitialized_zval_ptr); @@ -218,9 +218,9 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM } } } else { - if(zobj->ce->__set && !zobj->in_set) { + if (zobj->ce->__set && !zobj->in_set) { zobj->in_set = 1; /* prevent circular setting */ - if(zend_std_call_setter(object, member, value TSRMLS_CC) != SUCCESS) { + if (zend_std_call_setter(object, member, value TSRMLS_CC) != SUCCESS) { /* for now, just ignore it - __set should take care of warnings, etc. */ } setter_done = 1; @@ -228,7 +228,7 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM } } - if(!setter_done) { + if (!setter_done) { value->refcount++; zend_hash_update(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, &value, sizeof(zval *), NULL); } @@ -259,7 +259,7 @@ static zval **zend_std_get_property_ptr(zval *object, zval *member TSRMLS_DC) if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **) &retval) == FAILURE) { zval *new_zval; - if(!zobj->ce->__get) { + if (!zobj->ce->__get) { /* we don't have getter - will just add it */ new_zval = &EG(uninitialized_zval); @@ -352,13 +352,13 @@ static void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS) method_result_ptr is the true result of the called method */ - if(method_result_ptr) { + if (method_result_ptr) { *return_value = *method_result_ptr; zval_copy_ctor(return_value); zval_ptr_dtor(&method_result_ptr); } - if(call_result == FAILURE) { + if (call_result == FAILURE) { zend_error(E_ERROR, "Could not call __call handler for class %s", Z_OBJCE_P(this_ptr)->name); } @@ -382,8 +382,8 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name zend_str_tolower(lc_method_name, method_len); zobj = Z_OBJ_P(object); - if(zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&func_method) == FAILURE) { - if(zobj->ce->__call != NULL) { + if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&func_method) == FAILURE) { + if (zobj->ce->__call != NULL) { zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function)); call_user_call->type = ZEND_INTERNAL_FUNCTION; call_user_call->handler = zend_std_call_user_call; @@ -418,7 +418,7 @@ static int zend_std_compare_objects(zval *o1, zval *o2 TSRMLS_DC) zobj1 = Z_OBJ_P(o1); zobj2 = Z_OBJ_P(o2); - if(zobj1->ce != zobj2->ce) { + if (zobj1->ce != zobj2->ce) { return 1; /* different classes */ } return zend_compare_symbol_tables_i(zobj1->properties, zobj2->properties TSRMLS_CC); @@ -440,8 +440,8 @@ static int zend_std_has_property(zval *object, zval *member, int check_empty TSR member = &tmp_member; } - if(zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **)&value) == SUCCESS) { - if(check_empty) { + if (zend_hash_find(zobj->properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1, (void **)&value) == SUCCESS) { + if (check_empty) { result = zend_is_true(*value); } else { result = (Z_TYPE_PP(value) != IS_NULL); diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index 3534a57dc9..b2f0a9229c 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -26,7 +26,7 @@ ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TS for (i = 1; i < objects->top ; i++) { if (objects->object_buckets[i].valid) { struct _store_object *obj = &objects->object_buckets[i].bucket.obj; - if(obj->dtor) { + if (obj->dtor) { objects->object_buckets[i].destructor_called = 1; obj->dtor(obj->object, i TSRMLS_CC); } @@ -91,7 +91,7 @@ ZEND_API void zend_objects_store_delete_obj(zval *zobject TSRMLS_DC) } - if(obj->dtor && !EG(objects_store).object_buckets[handle].destructor_called) { + if (obj->dtor && !EG(objects_store).object_buckets[handle].destructor_called) { EG(objects_store).object_buckets[handle].destructor_called = 1; obj->dtor(obj->object, handle TSRMLS_CC); } @@ -115,7 +115,7 @@ ZEND_API void zend_objects_store_del_ref(zval *zobject TSRMLS_DC) if (--obj->refcount == 0) { if (EG(objects_store).object_buckets[handle].valid) { - if(!EG(objects_store).object_buckets[handle].destructor_called) { + if (!EG(objects_store).object_buckets[handle].destructor_called) { EG(objects_store).object_buckets[handle].destructor_called = 1; if (obj->dtor) { obj->dtor(obj->object, handle TSRMLS_CC); @@ -149,7 +149,7 @@ ZEND_API zend_object_value zend_objects_store_clone_obj(zval *zobject TSRMLS_DC) } obj = &EG(objects_store).object_buckets[handle].bucket.obj; - if(obj->clone == NULL) { + if (obj->clone == NULL) { zend_error(E_ERROR, "Trying to clone uncloneable object"); } @@ -222,7 +222,7 @@ ZEND_API void zend_object_proxy_set(zval **property, zval *value TSRMLS_DC) { zend_proxy_object *probj = zend_object_store_get_object(*property TSRMLS_CC); - if(Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->write_property) { + if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->write_property) { Z_OBJ_HT_P(probj->object)->write_property(probj->object, probj->property, value TSRMLS_CC); } else { zend_error(E_WARNING, "Cannot write property of object - no write handler defined"); @@ -233,7 +233,7 @@ ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC) { zend_proxy_object *probj = zend_object_store_get_object(property TSRMLS_CC); - if(Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->read_property) { + if (Z_OBJ_HT_P(probj->object) && Z_OBJ_HT_P(probj->object)->read_property) { return Z_OBJ_HT_P(probj->object)->read_property(probj->object, probj->property, BP_VAR_R TSRMLS_CC); } else { zend_error(E_WARNING, "Cannot read property of object - no read handler defined"); diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 50b9e7555b..ddb4eb1ab5 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -514,7 +514,7 @@ ZEND_API void convert_to_array(zval *op) ALLOC_HASHTABLE(ht); zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0); - if(Z_OBJ_HT_P(op)->get_properties) { + if (Z_OBJ_HT_P(op)->get_properties) { zend_hash_copy(ht, Z_OBJ_HT_P(op)->get_properties(op TSRMLS_CC), (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); } zval_dtor(op); @@ -1247,7 +1247,7 @@ ZEND_API int is_identical_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) } break; case IS_OBJECT: - if(Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2) && Z_OBJ_HANDLE_P(op1) == Z_OBJ_HANDLE_P(op2)) { + if (Z_OBJ_HT_P(op1) == Z_OBJ_HT_P(op2) && Z_OBJ_HANDLE_P(op1) == Z_OBJ_HANDLE_P(op2)) { result->value.lval = 1; } else { result->value.lval = 0; @@ -1459,7 +1459,7 @@ ZEND_API int increment_function(zval *op1) { switch (op1->type) { case IS_LONG: - if(op1->value.lval == LONG_MAX) { + if (op1->value.lval == LONG_MAX) { /* switch to double */ double d = (double)op1->value.lval; ZVAL_DOUBLE(op1, d+1); @@ -1481,7 +1481,7 @@ ZEND_API int increment_function(zval *op1) switch (is_numeric_string(strval, op1->value.str.len, &lval, &dval, 0)) { case IS_LONG: - if(lval == LONG_MAX) { + if (lval == LONG_MAX) { /* switch to double */ double d = (double)lval; ZVAL_DOUBLE(op1, d+1); @@ -1521,7 +1521,7 @@ ZEND_API int decrement_function(zval *op1) switch (op1->type) { case IS_LONG: - if(op1->value.lval == LONG_MIN) { + if (op1->value.lval == LONG_MIN) { double d = (double)op1->value.lval; ZVAL_DOUBLE(op1, d-1); } else { @@ -1541,7 +1541,7 @@ ZEND_API int decrement_function(zval *op1) switch(is_numeric_string(op1->value.str.val, op1->value.str.len, &lval, &dval, 0)) { case IS_LONG: STR_FREE(op1->value.str.val); - if(lval == LONG_MIN) { + if (lval == LONG_MIN) { double d = (double)lval; ZVAL_DOUBLE(op1, d-1); } else { @@ -1753,8 +1753,8 @@ ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC) return; } - if(Z_OBJ_HT_P(o1)->compare_objects == NULL) { - if(Z_OBJ_HANDLE_P(o1) == Z_OBJ_HANDLE_P(o2)) { + if (Z_OBJ_HT_P(o1)->compare_objects == NULL) { + if (Z_OBJ_HANDLE_P(o1) == Z_OBJ_HANDLE_P(o2)) { result->value.lval = 0; } else { result->value.lval = 1; |
