Skip to content

Commit b3823f5

Browse files
committed
Merge branch 'master' into jsond
Conflicts: ext/json/JSON_parser.c ext/json/JSON_parser.h ext/json/json.c ext/json/utf8_decode.c
2 parents e6fb493 + 3181744 commit b3823f5

File tree

987 files changed

+209059
-209000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

987 files changed

+209059
-209000
lines changed

TSRM/TSRM.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ void *tsrm_new_interpreter_context(void)
435435
current = tsrm_tls_get();
436436

437437
allocate_new_resource(&new_ctx, thread_id);
438-
438+
439439
/* switch back to the context that was in use prior to our creation
440440
* of the new one */
441441
return tsrm_set_interpreter_context(current);
@@ -613,7 +613,7 @@ TSRM_API MUTEX_T tsrm_mutex_alloc(void)
613613
#elif defined(BETHREADS)
614614
mutexp = (beos_ben*)malloc(sizeof(beos_ben));
615615
mutexp->ben = 0;
616-
mutexp->sem = create_sem(1, "PHP sempahore");
616+
mutexp->sem = create_sem(1, "PHP sempahore");
617617
#endif
618618
#ifdef THR_DEBUG
619619
printf("Mutex created thread: %d\n",mythreadid());
@@ -642,7 +642,7 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
642642
st_mutex_destroy(mutexp);
643643
#elif defined(BETHREADS)
644644
delete_sem(mutexp->sem);
645-
free(mutexp);
645+
free(mutexp);
646646
#endif
647647
}
648648
#ifdef THR_DEBUG
@@ -676,8 +676,8 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
676676
#elif defined(TSRM_ST)
677677
return st_mutex_lock(mutexp);
678678
#elif defined(BETHREADS)
679-
if (atomic_add(&mutexp->ben, 1) != 0)
680-
return acquire_sem(mutexp->sem);
679+
if (atomic_add(&mutexp->ben, 1) != 0)
680+
return acquire_sem(mutexp->sem);
681681
return 0;
682682
#endif
683683
}
@@ -708,9 +708,9 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
708708
#elif defined(TSRM_ST)
709709
return st_mutex_unlock(mutexp);
710710
#elif defined(BETHREADS)
711-
if (atomic_add(&mutexp->ben, -1) != 1)
711+
if (atomic_add(&mutexp->ben, -1) != 1)
712712
return release_sem(mutexp->sem);
713-
return 0;
713+
return 0;
714714
#endif
715715
}
716716

TSRM/TSRM.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ typedef uintptr_t tsrm_uintptr_t;
5353
#elif defined(TSRM_ST)
5454
# include <st.h>
5555
#elif defined(BETHREADS)
56-
#include <kernel/OS.h>
56+
#include <kernel/OS.h>
5757
#include <TLS.h>
5858
#endif
5959

@@ -84,7 +84,7 @@ typedef struct {
8484
sem_id sem;
8585
int32 ben;
8686
} beos_ben;
87-
# define MUTEX_T beos_ben *
87+
# define MUTEX_T beos_ben *
8888
#endif
8989

9090
#ifdef HAVE_SIGNAL_H
@@ -176,7 +176,7 @@ TSRM_API void *tsrm_get_ls_cache(void);
176176
/* BC only */
177177
#define TSRMLS_D void
178178
#define TSRMLS_DC
179-
#define TSRMLS_C
179+
#define TSRMLS_C
180180
#define TSRMLS_CC
181181
#define TSRMLS_FETCH()
182182

TSRM/tsrm_strtok_r.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ main()
5656
printf ("Token = '%s'\n", token);
5757
token = tsrm_strtok_r(NULL, "/\\", &last);
5858
}
59-
59+
6060
return 0;
6161
}
6262

TSRM/tsrm_win32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ TSRMLS_CACHE_UPDATE;
5252
globals->comspec = _strdup((GetVersion()<0x80000000)?"cmd.exe":"command.com");
5353

5454
/* Set it to INVALID_HANDLE_VALUE
55-
* It will be initialized correctly in tsrm_win32_access or set to
55+
* It will be initialized correctly in tsrm_win32_access or set to
5656
* NULL if no impersonation has been done.
5757
* the impersonated token can't be set here as the impersonation
5858
* will happen later, in fcgi_accept_request (or whatever is the

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ PHP X.Y UPGRADE NOTES
5454
. zend_function.common.num_args don't include the variadic argument anymore.
5555
. ob_start() no longer issues an E_ERROR, but instead an E_RECOVERABLE_ERROR in case an
5656
output buffer is created in an output buffer handler.
57+
. Add zend_memnstr_ex, which is based on string matching sunday algo.
5758

5859
- DBA
5960
. dba_delete() now returns false if the key was not found for the inifile

Zend/zend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...) /
12581258
if (!file_handle) {
12591259
continue;
12601260
}
1261-
1261+
12621262
op_array = zend_compile_file(file_handle, type);
12631263
if (file_handle->opened_path) {
12641264
zend_hash_str_add_empty_element(&EG(included_files), file_handle->opened_path, strlen(file_handle->opened_path));

Zend/zend.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
| Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 2.00 of the Zend license, |
8-
| that is bundled with this package in the file LICENSE, and is |
8+
| that is bundled with this package in the file LICENSE, and is |
99
| available through the world-wide-web at the following url: |
1010
| http://www.zend.com/license/2_00.txt. |
1111
| If you did not receive a copy of the Zend license and are unable to |
@@ -79,7 +79,7 @@ ZEND_TSRMLS_CACHE_EXTERN;
7979
#ifdef HAVE_NORETURN
8080
# if defined(ZEND_WIN32)
8181
ZEND_API ZEND_NORETURN void zend_error_noreturn(int type, const char *format, ...);
82-
# else
82+
# else
8383
void zend_error_noreturn(int type, const char *format, ...) ZEND_NORETURN;
8484
# endif
8585
#else
@@ -98,13 +98,13 @@ typedef struct _zend_serialize_data zend_serialize_data;
9898
typedef struct _zend_unserialize_data zend_unserialize_data;
9999

100100
typedef struct _zend_trait_method_reference {
101-
zend_string *method_name;
101+
zend_string *method_name;
102102
zend_class_entry *ce;
103103
zend_string *class_name;
104104
} zend_trait_method_reference;
105105

106106
typedef struct _zend_trait_precedence {
107-
zend_trait_method_reference *trait_method;
107+
zend_trait_method_reference *trait_method;
108108
union {
109109
zend_class_entry *ce;
110110
zend_string *class_name;
@@ -113,12 +113,12 @@ typedef struct _zend_trait_precedence {
113113

114114
typedef struct _zend_trait_alias {
115115
zend_trait_method_reference *trait_method;
116-
116+
117117
/**
118118
* name for method to be added
119119
*/
120120
zend_string *alias;
121-
121+
122122
/**
123123
* modifiers to be set on trait method
124124
*/
@@ -170,7 +170,7 @@ struct _zend_class_entry {
170170
uint32_t num_interfaces;
171171
uint32_t num_traits;
172172
zend_class_entry **interfaces;
173-
173+
174174
zend_class_entry **traits;
175175
zend_trait_alias **trait_aliases;
176176
zend_trait_precedence **trait_precedences;

Zend/zend_API.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
423423
}
424424
}
425425
break;
426-
426+
427427
case 'p':
428428
{
429429
char **p = va_arg(*va, char **);
@@ -1006,9 +1006,9 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type) /* {{{ *
10061006
zend_update_class_constants(class_type->parent);
10071007
}
10081008
#if ZTS
1009-
CG(static_members_table)[(zend_intptr_t)(class_type->static_members_table)] = emalloc(sizeof(zval*) * class_type->default_static_members_count);
1009+
CG(static_members_table)[(zend_intptr_t)(class_type->static_members_table)] = emalloc(sizeof(zval) * class_type->default_static_members_count);
10101010
#else
1011-
class_type->static_members_table = emalloc(sizeof(zval*) * class_type->default_static_members_count);
1011+
class_type->static_members_table = emalloc(sizeof(zval) * class_type->default_static_members_count);
10121012
#endif
10131013
for (i = 0; i < class_type->default_static_members_count; i++) {
10141014
p = &class_type->default_static_members_table[i];
@@ -1121,7 +1121,7 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties)
11211121
prop = zend_hash_update(object->properties, key, prop);
11221122
zval_add_ref(prop);
11231123
}
1124-
} ZEND_HASH_FOREACH_END();
1124+
} ZEND_HASH_FOREACH_END();
11251125
}
11261126
/* }}} */
11271127

@@ -1176,7 +1176,7 @@ ZEND_API int add_assoc_function(zval *arg, const char *key, void (*function_ptr)
11761176
ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_long n) /* {{{ */
11771177
{
11781178
zval *ret, tmp;
1179-
1179+
11801180
ZVAL_LONG(&tmp, n);
11811181
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
11821182
return ret ? SUCCESS : FAILURE;
@@ -1186,7 +1186,7 @@ ZEND_API int add_assoc_long_ex(zval *arg, const char *key, size_t key_len, zend_
11861186
ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len) /* {{{ */
11871187
{
11881188
zval *ret, tmp;
1189-
1189+
11901190
ZVAL_NULL(&tmp);
11911191
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
11921192
return ret ? SUCCESS : FAILURE;
@@ -1196,7 +1196,7 @@ ZEND_API int add_assoc_null_ex(zval *arg, const char *key, size_t key_len) /* {{
11961196
ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b) /* {{{ */
11971197
{
11981198
zval *ret, tmp;
1199-
1199+
12001200
ZVAL_BOOL(&tmp, b);
12011201
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
12021202
return ret ? SUCCESS : FAILURE;
@@ -1206,7 +1206,7 @@ ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b
12061206
ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r) /* {{{ */
12071207
{
12081208
zval *ret, tmp;
1209-
1209+
12101210
ZVAL_RES(&tmp, r);
12111211
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
12121212
return ret ? SUCCESS : FAILURE;
@@ -1216,7 +1216,7 @@ ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, z
12161216
ZEND_API int add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d) /* {{{ */
12171217
{
12181218
zval *ret, tmp;
1219-
1219+
12201220
ZVAL_DOUBLE(&tmp, d);
12211221
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
12221222
return ret ? SUCCESS : FAILURE;
@@ -1236,7 +1236,7 @@ ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_s
12361236
ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str) /* {{{ */
12371237
{
12381238
zval *ret, tmp;
1239-
1239+
12401240
ZVAL_STRING(&tmp, str);
12411241
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
12421242
return ret ? SUCCESS : FAILURE;
@@ -1246,7 +1246,7 @@ ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, cha
12461246
ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length) /* {{{ */
12471247
{
12481248
zval *ret, tmp;
1249-
1249+
12501250
ZVAL_STRINGL(&tmp, str, length);
12511251
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, &tmp);
12521252
return ret ? SUCCESS : FAILURE;
@@ -1256,7 +1256,7 @@ ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, ch
12561256
ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value) /* {{{ */
12571257
{
12581258
zval *ret;
1259-
1259+
12601260
ret = zend_symtable_str_update(Z_ARRVAL_P(arg), key, key_len, value);
12611261
return ret ? SUCCESS : FAILURE;
12621262
}
@@ -1782,7 +1782,7 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
17821782
module_post_deactivate_handlers = module_request_shutdown_handlers + shutdown_count + 1;
17831783
module_post_deactivate_handlers[post_deactivate_count] = NULL;
17841784
startup_count = 0;
1785-
1785+
17861786
ZEND_HASH_FOREACH_PTR(&module_registry, module) {
17871787
if (module->request_startup_func) {
17881788
module_request_startup_handlers[startup_count++] = module;
@@ -2025,7 +2025,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio
20252025
}
20262026
if (ptr->arg_info) {
20272027
zend_internal_function_info *info = (zend_internal_function_info*)ptr->arg_info;
2028-
2028+
20292029
internal_function->arg_info = (zend_internal_arg_info*)ptr->arg_info+1;
20302030
internal_function->num_args = ptr->num_args;
20312031
/* Currently you cannot denote that the function can accept less arguments than num_args */
@@ -2651,7 +2651,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_fcall_info_cache
26512651
zend_string *lcname;
26522652
ALLOCA_FLAG(use_heap);
26532653

2654-
STR_ALLOCA_ALLOC(lcname, name_len, use_heap);
2654+
STR_ALLOCA_ALLOC(lcname, name_len, use_heap);
26552655
zend_str_tolower_copy(lcname->val, name->val, name_len);
26562656

26572657
*strict_class = 0;
@@ -3015,7 +3015,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint
30153015
if (error) {
30163016
*error = NULL;
30173017
}
3018-
3018+
30193019
fcc->initialized = 0;
30203020
fcc->calling_scope = NULL;
30213021
fcc->called_scope = NULL;
@@ -3093,7 +3093,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint
30933093
if (callable_name) {
30943094
char *ptr;
30953095

3096-
3096+
30973097
*callable_name = zend_string_alloc(Z_STRLEN_P(obj) + Z_STRLEN_P(method) + sizeof("::") - 1, 0);
30983098
ptr = (*callable_name)->val;
30993099
memcpy(ptr, Z_STRVAL_P(obj), Z_STRLEN_P(obj));
@@ -3182,7 +3182,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint
31823182
*callable_name = zend_string_alloc(ce->name->len + sizeof("::__invoke") - 1, 0);
31833183
memcpy((*callable_name)->val, ce->name->val, ce->name->len);
31843184
memcpy((*callable_name)->val + ce->name->len, "::__invoke", sizeof("::__invoke"));
3185-
}
3185+
}
31863186
return 1;
31873187
}
31883188
/* break missing intentionally */
@@ -3749,7 +3749,7 @@ ZEND_API int zend_update_static_property(zend_class_entry *scope, const char *na
37493749
ZEND_API int zend_update_static_property_null(zend_class_entry *scope, const char *name, size_t name_length) /* {{{ */
37503750
{
37513751
zval tmp;
3752-
3752+
37533753
ZVAL_NULL(&tmp);
37543754
return zend_update_static_property(scope, name, name_length, &tmp);
37553755
}
@@ -3958,7 +3958,7 @@ ZEND_API void zend_ctor_make_null(zend_execute_data *execute_data) /* {{{ */
39583958
if (Z_TYPE_P(EX(return_value)) == IS_OBJECT) {
39593959
zend_object *object = Z_OBJ_P(EX(return_value));
39603960
zend_execute_data *ex = EX(prev_execute_data);
3961-
3961+
39623962
while (ex && Z_OBJ(ex->This) == object) {
39633963
if (ex->func) {
39643964
if (ZEND_USER_CODE(ex->func->type)) {

Zend/zend_API.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
462462

463463
/** Build zend_call_info/cache from a zval*
464464
*
465-
* Caller is responsible to provide a return value, otherwise the we will crash.
465+
* Caller is responsible to provide a return value, otherwise the we will crash.
466466
* fci->retval_ptr_ptr = NULL;
467467
* In order to pass parameters the following members need to be set:
468468
* fci->param_count = 0;

Zend/zend_alloc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
| Copyright (c) 1998-2014 Zend Technologies Ltd. (http://www.zend.com) |
66
+----------------------------------------------------------------------+
77
| This source file is subject to version 2.00 of the Zend license, |
8-
| that is bundled with this package in the file LICENSE, and is |
8+
| that is bundled with this package in the file LICENSE, and is |
99
| available through the world-wide-web at the following url: |
1010
| http://www.zend.com/license/2_00.txt. |
1111
| If you did not receive a copy of the Zend license and are unable to |
@@ -94,7 +94,7 @@ ZEND_API void* ZEND_FASTCALL _emalloc_huge(size_t size) ZEND_ATTRIBUTE_MALLOC ZE
9494
ZEND_ALLOCATOR(size) \
9595
: \
9696
_emalloc(size) \
97-
)
97+
)
9898

9999
# define _ZEND_BIN_DEALLOCATOR_DEF(_num, _size, _elements, _pages, x, y) \
100100
ZEND_API void ZEND_FASTCALL _efree_ ## _size(void *);

Zend/zend_arena.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static zend_always_inline void* zend_arena_alloc(zend_arena **arena_ptr, size_t
6262
if (EXPECTED(size <= (size_t)(arena->end - ptr))) {
6363
arena->ptr = ptr + size;
6464
} else {
65-
size_t arena_size =
65+
size_t arena_size =
6666
UNEXPECTED((size + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))) > (size_t)(arena->end - (char*) arena)) ?
6767
(size + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena))) :
6868
(size_t)(arena->end - (char*) arena);
@@ -72,7 +72,7 @@ static zend_always_inline void* zend_arena_alloc(zend_arena **arena_ptr, size_t
7272
new_arena->ptr = (char*) new_arena + ZEND_MM_ALIGNED_SIZE(sizeof(zend_arena)) + size;
7373
new_arena->end = (char*) new_arena + arena_size;
7474
new_arena->prev = arena;
75-
*arena_ptr = new_arena;
75+
*arena_ptr = new_arena;
7676
}
7777

7878
return (void*) ptr;

Zend/zend_build.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@
4141
#endif
4242

4343
/* for private applications */
44-
#define ZEND_BUILD_EXTRA
44+
#define ZEND_BUILD_EXTRA
4545

4646
#endif

0 commit comments

Comments
 (0)