Skip to content

Commit

Permalink
trailing whitespace removal
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Jan 10, 2015
1 parent 773c8b0 commit b7a7b1a
Show file tree
Hide file tree
Showing 990 changed files with 209,000 additions and 209,000 deletions.
14 changes: 7 additions & 7 deletions TSRM/TSRM.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ void *tsrm_new_interpreter_context(void)
current = tsrm_tls_get();

allocate_new_resource(&new_ctx, thread_id);

/* switch back to the context that was in use prior to our creation
* of the new one */
return tsrm_set_interpreter_context(current);
Expand Down Expand Up @@ -613,7 +613,7 @@ TSRM_API MUTEX_T tsrm_mutex_alloc(void)
#elif defined(BETHREADS)
mutexp = (beos_ben*)malloc(sizeof(beos_ben));
mutexp->ben = 0;
mutexp->sem = create_sem(1, "PHP sempahore");
mutexp->sem = create_sem(1, "PHP sempahore");
#endif
#ifdef THR_DEBUG
printf("Mutex created thread: %d\n",mythreadid());
Expand Down Expand Up @@ -642,7 +642,7 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
st_mutex_destroy(mutexp);
#elif defined(BETHREADS)
delete_sem(mutexp->sem);
free(mutexp);
free(mutexp);
#endif
}
#ifdef THR_DEBUG
Expand Down Expand Up @@ -676,8 +676,8 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
#elif defined(TSRM_ST)
return st_mutex_lock(mutexp);
#elif defined(BETHREADS)
if (atomic_add(&mutexp->ben, 1) != 0)
return acquire_sem(mutexp->sem);
if (atomic_add(&mutexp->ben, 1) != 0)
return acquire_sem(mutexp->sem);
return 0;
#endif
}
Expand Down Expand Up @@ -708,9 +708,9 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
#elif defined(TSRM_ST)
return st_mutex_unlock(mutexp);
#elif defined(BETHREADS)
if (atomic_add(&mutexp->ben, -1) != 1)
if (atomic_add(&mutexp->ben, -1) != 1)
return release_sem(mutexp->sem);
return 0;
return 0;
#endif
}

Expand Down
6 changes: 3 additions & 3 deletions TSRM/TSRM.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ typedef uintptr_t tsrm_uintptr_t;
#elif defined(TSRM_ST)
# include <st.h>
#elif defined(BETHREADS)
#include <kernel/OS.h>
#include <kernel/OS.h>
#include <TLS.h>
#endif

Expand Down Expand Up @@ -84,7 +84,7 @@ typedef struct {
sem_id sem;
int32 ben;
} beos_ben;
# define MUTEX_T beos_ben *
# define MUTEX_T beos_ben *
#endif

#ifdef HAVE_SIGNAL_H
Expand Down Expand Up @@ -176,7 +176,7 @@ TSRM_API void *tsrm_get_ls_cache(void);
/* BC only */
#define TSRMLS_D void
#define TSRMLS_DC
#define TSRMLS_C
#define TSRMLS_C
#define TSRMLS_CC
#define TSRMLS_FETCH()

Expand Down
2 changes: 1 addition & 1 deletion TSRM/tsrm_strtok_r.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ main()
printf ("Token = '%s'\n", token);
token = tsrm_strtok_r(NULL, "/\\", &last);
}

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion TSRM/tsrm_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ TSRMLS_CACHE_UPDATE;
globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com");

/* Set it to INVALID_HANDLE_VALUE
* It will be initialized correctly in tsrm_win32_access or set to
* It will be initialized correctly in tsrm_win32_access or set to
* NULL if no impersonation has been done.
* the impersonated token can't be set here as the impersonation
* will happen later, in fcgi_accept_request (or whatever is the
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...) /
if (!file_handle) {
continue;
}

op_array = zend_compile_file(file_handle, type);
if (file_handle->opened_path) {
zend_hash_str_add_empty_element(&EG(included_files), file_handle->opened_path, strlen(file_handle->opened_path));
Expand Down
14 changes: 7 additions & 7 deletions Zend/zend.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
Expand Down Expand Up @@ -79,7 +79,7 @@ ZEND_TSRMLS_CACHE_EXTERN;
#ifdef HAVE_NORETURN
# if defined(ZEND_WIN32)
ZEND_API ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...);
# else
# else
void zend_error_noreturn(int type, const char *format, ...) ZEND_NORETURN;
# endif
#else
Expand All @@ -98,13 +98,13 @@ typedef struct _zend_serialize_data zend_serialize_data;
typedef struct _zend_unserialize_data zend_unserialize_data;

typedef struct _zend_trait_method_reference {
zend_string *method_name;
zend_string *method_name;
zend_class_entry *ce;
zend_string *class_name;
} zend_trait_method_reference;

typedef struct _zend_trait_precedence {
zend_trait_method_reference *trait_method;
zend_trait_method_reference *trait_method;
union {
zend_class_entry *ce;
zend_string *class_name;
Expand All @@ -113,12 +113,12 @@ typedef struct _zend_trait_precedence {

typedef struct _zend_trait_alias {
zend_trait_method_reference *trait_method;

/**
* name for method to be added
*/
zend_string *alias;

/**
* modifiers to be set on trait method
*/
Expand Down Expand Up @@ -170,7 +170,7 @@ struct _zend_class_entry {
uint32_t num_interfaces;
uint32_t num_traits;
zend_class_entry **interfaces;

zend_class_entry **traits;
zend_trait_alias **trait_aliases;
zend_trait_precedence **trait_precedences;
Expand Down
36 changes: 18 additions & 18 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
}
}
break;

case 'p':
{
char **p = va_arg(*va, char **);
Expand Down Expand Up @@ -1121,7 +1121,7 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties)
prop = zend_hash_update(object->properties, key, prop);
zval_add_ref(prop);
}
} ZEND_HASH_FOREACH_END();
} ZEND_HASH_FOREACH_END();
}
/* }}} */

Expand Down Expand Up @@ -1176,7 +1176,7 @@ ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)
ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */
{
zval *ret, tmp;

ZVAL_LONG(&tmp, n);
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
return ret ? SUCCESS : FAILURE;
Expand All @@ -1186,7 +1186,7 @@ ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_
ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */
{
zval *ret, tmp;

ZVAL_NULL(&tmp);
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
return ret ? SUCCESS : FAILURE;
Expand All @@ -1196,7 +1196,7 @@ ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len) /* {{
ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b) /* {{{ */
{
zval *ret, tmp;

ZVAL_BOOL(&tmp, b);
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
return ret ? SUCCESS : FAILURE;
Expand All @@ -1206,7 +1206,7 @@ ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b
ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */
{
zval *ret, tmp;

ZVAL_RES(&tmp, r);
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
return ret ? SUCCESS : FAILURE;
Expand All @@ -1216,7 +1216,7 @@ ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, z
ZEND_API int add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */
{
zval *ret, tmp;

ZVAL_DOUBLE(&tmp, d);
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
return ret ? SUCCESS : FAILURE;
Expand All @@ -1236,7 +1236,7 @@ ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_s
ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str) /* {{{ */
{
zval *ret, tmp;

ZVAL_STRING(&tmp, str);
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
return ret ? SUCCESS : FAILURE;
Expand All @@ -1246,7 +1246,7 @@ ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, cha
ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length) /* {{{ */
{
zval *ret, tmp;

ZVAL_STRINGL(&tmp, str, length);
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
return ret ? SUCCESS : FAILURE;
Expand All @@ -1256,7 +1256,7 @@ ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, ch
ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */
{
zval *ret;

ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, value);
return ret ? SUCCESS : FAILURE;
}
Expand Down Expand Up @@ -1782,7 +1782,7 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
module_post_deactivate_handlers = module_request_shutdown_handlers + shutdown_count + 1;
module_post_deactivate_handlers[post_deactivate_count] = NULL;
startup_count = 0;

ZEND_HASH_FOREACH_PTR(&module_registry, module) {
if (module->request_startup_func) {
module_request_startup_handlers[startup_count++] = module;
Expand Down Expand Up @@ -2025,7 +2025,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
}
if (ptr->arg_info) {
zend_internal_function_info *info = (zend_internal_function_info*)ptr->arg_info;

internal_function->arg_info = (zend_internal_arg_info*)ptr->arg_info+1;
internal_function->num_args = ptr->num_args;
/* Currently you cannot denote that the function can accept less arguments than num_args */
Expand Down Expand Up @@ -2651,7 +2651,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache
zend_string *lcname;
ALLOCA_FLAG(use_heap);

STR_ALLOCA_ALLOC(lcname, name_len, use_heap);
STR_ALLOCA_ALLOC(lcname, name_len, use_heap);
zend_str_tolower_copy(lcname->val, name->val, name_len);

*strict_class = 0;
Expand Down Expand Up @@ -3015,7 +3015,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint
if (error) {
*error = NULL;
}

fcc->initialized = 0;
fcc->calling_scope = NULL;
fcc->called_scope = NULL;
Expand Down Expand Up @@ -3093,7 +3093,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint
if (callable_name) {
char *ptr;


*callable_name = zend_string_alloc(Z_STRLEN_P(obj) + Z_STRLEN_P(method) + sizeof("::") - 1, 0);
ptr = (*callable_name)->val;
memcpy(ptr, Z_STRVAL_P(obj), Z_STRLEN_P(obj));
Expand Down Expand Up @@ -3182,7 +3182,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint
*callable_name = zend_string_alloc(ce->name->len + sizeof("::__invoke") - 1, 0);
memcpy((*callable_name)->val, ce->name->val, ce->name->len);
memcpy((*callable_name)->val + ce->name->len, "::__invoke", sizeof("::__invoke"));
}
}
return 1;
}
/* break missing intentionally */
Expand Down Expand Up @@ -3749,7 +3749,7 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *na
ZEND_API int zend_update_static_property_null(zend_class_entry *scope, const char *name, size_t name_length) /* {{{ */
{
zval tmp;

ZVAL_NULL(&tmp);
return zend_update_static_property(scope, name, name_length, &tmp);
}
Expand Down Expand Up @@ -3958,7 +3958,7 @@ ZEND_API void zend_ctor_make_null(zend_execute_data *execute_data) /* {{{ */
if (Z_TYPE_P(EX(return_value)) == IS_OBJECT) {
zend_object *object = Z_OBJ_P(EX(return_value));
zend_execute_data *ex = EX(prev_execute_data);
while (ex && Z_OBJ(ex->This) == object) {
if (ex->func) {
if (ZEND_USER_CODE(ex->func->type)) {
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;

/** Build zend_call_info/cache from a zval*
*
* Caller is responsible to provide a return value, otherwise the we will crash.
* Caller is responsible to provide a return value, otherwise the we will crash.
* fci->retval_ptr_ptr = NULL;
* In order to pass parameters the following members need to be set:
* fci->param_count = 0;
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
| Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) |
+----------------------------------------------------------------------+
| This source file is subject to version 2.00 of the Zend license, |
| that is bundled with this package in the file LICENSE, and is |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.zend.com/license/2_00.txt. |
| If you did not receive a copy of the Zend license and are unable to |
Expand Down Expand Up @@ -94,7 +94,7 @@ ZEND_API void* ZEND_FASTCALL _emalloc_huge(size_t size) ZEND_ATTRIBUTE_MALLOC ZE
ZEND_ALLOCATOR(size) \
: \
_emalloc(size) \
)
)

# define _ZEND_BIN_DEALLOCATOR_DEF(_num, _size, _elements, _pages, x, y) \
ZEND_API void ZEND_FASTCALL _efree_ ## _size(void *);
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_arena.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static zend_always_inline void* zend_arena_alloc(zend_arena **arena_ptr, size_t
if (EXPECTED(size <= (size_t)(arena->end - ptr))) {
arena->ptr = ptr + size;
} else {
size_t arena_size =
size_t arena_size =
UNEXPECTED((size + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))) > (size_t)(arena->end - (char*) arena)) ?
(size + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))) :
(size_t)(arena->end - (char*) arena);
Expand All @@ -72,7 +72,7 @@ static zend_always_inline void* zend_arena_alloc(zend_arena **arena_ptr, size_t
new_arena->ptr = (char*) new_arena + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena)) + size;
new_arena->end = (char*) new_arena + arena_size;
new_arena->prev = arena;
*arena_ptr = new_arena;
*arena_ptr = new_arena;
}

return (void*) ptr;
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_build.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
#endif

/* for private applications */
#define ZEND_BUILD_EXTRA
#define ZEND_BUILD_EXTRA

#endif
Loading

0 comments on commit b7a7b1a

Please sign in to comment.