diff options
| author | Andi Gutmans <andi@php.net> | 2003-06-30 20:22:35 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 2003-06-30 20:22:35 +0000 |
| commit | 288dacca0c2107b0e6fdd9adf70adafd744fc3e8 (patch) | |
| tree | 93f5389b202884c3f113221de5567b30b0b0d0eb /Zend/zend_constants.c | |
| parent | 5ee72bb4781c38c718b80ad572acc66a213933eb (diff) | |
| download | php-git-288dacca0c2107b0e6fdd9adf70adafd744fc3e8.tar.gz | |
- ZE coding style requires if ( instead of if(
Diffstat (limited to 'Zend/zend_constants.c')
| -rw-r--r-- | Zend/zend_constants.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index 6235615579..365f3cf482 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -215,7 +215,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC int retval = 1; char *colon; - if((colon = memchr(name, ':', name_len)) && colon[1] == ':') { + if ((colon = memchr(name, ':', name_len)) && colon[1] == ':') { /* class constant */ zend_class_entry **ce = NULL, *scope; int class_name_len = colon-name; @@ -223,7 +223,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC char *constant_name = colon+2; zval **ret_constant; - if(EG(in_execution)) { + if (EG(in_execution)) { scope = EG(scope); } else { scope = CG(active_class_entry); @@ -232,8 +232,8 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC lookup_name = do_alloca(class_name_len+1); zend_str_tolower_copy(lookup_name, name, class_name_len); lookup_name[class_name_len] = '\0'; - if(class_name_len == sizeof("self")-1 && strcmp(lookup_name, "self") == 0) { - if(scope) { + if (class_name_len == sizeof("self")-1 && strcmp(lookup_name, "self") == 0) { + if (scope) { ce = &scope; } else { zend_error(E_ERROR, "Cannot access self:: when no class scope is active"); @@ -248,12 +248,12 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC ce = &scope->parent; } } else { - if(zend_lookup_class(lookup_name, class_name_len, &ce TSRMLS_CC) != SUCCESS) { + if (zend_lookup_class(lookup_name, class_name_len, &ce TSRMLS_CC) != SUCCESS) { retval = 0; } } - if(retval && ce) { + if (retval && ce) { if (zend_hash_find(&((*ce)->constants_table), constant_name, const_name_len+1, (void **) &ret_constant) != SUCCESS) { retval = 0; } @@ -261,7 +261,7 @@ ZEND_API int zend_get_constant(char *name, uint name_len, zval *result TSRMLS_DC retval = 0; } - if(retval) { + if (retval) { *result = **ret_constant; zval_copy_ctor(result); } |
