mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed compilation warnings
This commit is contained in:
parent
c0b49a701a
commit
5864ce8a44
20 changed files with 80 additions and 85 deletions
|
@ -133,7 +133,6 @@ static void print_hash(zend_write_func_t write_func, HashTable *ht, int indent,
|
||||||
{
|
{
|
||||||
zval *tmp;
|
zval *tmp;
|
||||||
zend_string *string_key;
|
zend_string *string_key;
|
||||||
HashPosition iterator;
|
|
||||||
ulong num_key;
|
ulong num_key;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -193,7 +192,6 @@ static void print_flat_hash(HashTable *ht TSRMLS_DC) /* {{{ */
|
||||||
{
|
{
|
||||||
zval *tmp;
|
zval *tmp;
|
||||||
zend_string *string_key;
|
zend_string *string_key;
|
||||||
HashPosition iterator;
|
|
||||||
ulong num_key;
|
ulong num_key;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
|
@ -1029,7 +1027,7 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
|
||||||
zval params[5];
|
zval params[5];
|
||||||
zval retval;
|
zval retval;
|
||||||
const char *error_filename;
|
const char *error_filename;
|
||||||
uint error_lineno;
|
uint error_lineno = 0;
|
||||||
zval orig_user_error_handler;
|
zval orig_user_error_handler;
|
||||||
zend_bool in_compilation;
|
zend_bool in_compilation;
|
||||||
zend_class_entry *saved_class_entry;
|
zend_class_entry *saved_class_entry;
|
||||||
|
|
|
@ -1222,10 +1222,9 @@ ZEND_API void object_properties_init_ex(zend_object *object, HashTable *properti
|
||||||
if (object->ce->default_properties_count) {
|
if (object->ce->default_properties_count) {
|
||||||
zval *prop, tmp;
|
zval *prop, tmp;
|
||||||
zend_string *key;
|
zend_string *key;
|
||||||
ulong num_key;
|
|
||||||
zend_property_info *property_info;
|
zend_property_info *property_info;
|
||||||
|
|
||||||
ZEND_HASH_FOREACH_KEY_VAL(properties, num_key, key, prop) {
|
ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
|
||||||
ZVAL_STR(&tmp, key);
|
ZVAL_STR(&tmp, key);
|
||||||
property_info = zend_get_property_info(object->ce, &tmp, 1 TSRMLS_CC);
|
property_info = zend_get_property_info(object->ce, &tmp, 1 TSRMLS_CC);
|
||||||
if (property_info &&
|
if (property_info &&
|
||||||
|
@ -1243,10 +1242,9 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties
|
||||||
{
|
{
|
||||||
zval *prop, tmp;
|
zval *prop, tmp;
|
||||||
zend_string *key;
|
zend_string *key;
|
||||||
ulong num_key;
|
|
||||||
zend_property_info *property_info;
|
zend_property_info *property_info;
|
||||||
|
|
||||||
ZEND_HASH_FOREACH_KEY_VAL(properties, num_key, key, prop) {
|
ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
|
||||||
ZVAL_STR(&tmp, key);
|
ZVAL_STR(&tmp, key);
|
||||||
property_info = zend_get_property_info(object->ce, &tmp, 1 TSRMLS_CC);
|
property_info = zend_get_property_info(object->ce, &tmp, 1 TSRMLS_CC);
|
||||||
if (property_info &&
|
if (property_info &&
|
||||||
|
@ -4000,10 +3998,8 @@ ZEND_API zend_string* zend_find_alias_name(zend_class_entry *ce, zend_string *na
|
||||||
ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_function *f) /* {{{ */
|
ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_function *f) /* {{{ */
|
||||||
{
|
{
|
||||||
zend_function *func;
|
zend_function *func;
|
||||||
HashPosition iterator;
|
|
||||||
HashTable *function_table;
|
HashTable *function_table;
|
||||||
zend_string *name;
|
zend_string *name;
|
||||||
ulong idx;
|
|
||||||
|
|
||||||
if (f->common.type != ZEND_USER_FUNCTION ||
|
if (f->common.type != ZEND_USER_FUNCTION ||
|
||||||
*(f->op_array.refcount) < 2 ||
|
*(f->op_array.refcount) < 2 ||
|
||||||
|
@ -4013,7 +4009,7 @@ ZEND_API zend_string *zend_resolve_method_name(zend_class_entry *ce, zend_functi
|
||||||
}
|
}
|
||||||
|
|
||||||
function_table = &ce->function_table;
|
function_table = &ce->function_table;
|
||||||
ZEND_HASH_FOREACH_KEY_PTR(function_table, idx, name, func) {
|
ZEND_HASH_FOREACH_STR_KEY_PTR(function_table, name, func) {
|
||||||
if (func == f) {
|
if (func == f) {
|
||||||
if (!name) {
|
if (!name) {
|
||||||
return f->common.function_name;
|
return f->common.function_name;
|
||||||
|
|
|
@ -619,13 +619,10 @@ ZEND_FUNCTION(each)
|
||||||
zend_hash_str_update(Z_ARRVAL_P(return_value), "value", sizeof("value")-1, entry);
|
zend_hash_str_update(Z_ARRVAL_P(return_value), "value", sizeof("value")-1, entry);
|
||||||
|
|
||||||
/* add the key elements */
|
/* add the key elements */
|
||||||
switch (zend_hash_get_current_key(target_hash, &key, &num_key, 0)) {
|
if (zend_hash_get_current_key(target_hash, &key, &num_key, 0) == HASH_KEY_IS_STRING) {
|
||||||
case HASH_KEY_IS_STRING:
|
inserted_pointer = add_get_index_str(return_value, 0, STR_COPY(key));
|
||||||
inserted_pointer = add_get_index_str(return_value, 0, STR_COPY(key));
|
} else {
|
||||||
break;
|
inserted_pointer = add_get_index_long(return_value, 0, num_key);
|
||||||
case HASH_KEY_IS_LONG:
|
|
||||||
inserted_pointer = add_get_index_long(return_value, 0, num_key);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
zend_hash_str_update(Z_ARRVAL_P(return_value), "key", sizeof("key")-1, inserted_pointer);
|
zend_hash_str_update(Z_ARRVAL_P(return_value), "key", sizeof("key")-1, inserted_pointer);
|
||||||
if (Z_REFCOUNTED_P(inserted_pointer)) Z_ADDREF_P(inserted_pointer);
|
if (Z_REFCOUNTED_P(inserted_pointer)) Z_ADDREF_P(inserted_pointer);
|
||||||
|
@ -902,9 +899,8 @@ static void add_class_vars(zend_class_entry *ce, int statics, zval *return_value
|
||||||
zend_property_info *prop_info;
|
zend_property_info *prop_info;
|
||||||
zval *prop, prop_copy;
|
zval *prop, prop_copy;
|
||||||
zend_string *key;
|
zend_string *key;
|
||||||
ulong num_index;
|
|
||||||
|
|
||||||
ZEND_HASH_FOREACH_KEY_PTR(&ce->properties_info, num_index, key, prop_info) {
|
ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->properties_info, key, prop_info) {
|
||||||
if (((prop_info->flags & ZEND_ACC_SHADOW) &&
|
if (((prop_info->flags & ZEND_ACC_SHADOW) &&
|
||||||
prop_info->ce != EG(scope)) ||
|
prop_info->ce != EG(scope)) ||
|
||||||
((prop_info->flags & ZEND_ACC_PROTECTED) &&
|
((prop_info->flags & ZEND_ACC_PROTECTED) &&
|
||||||
|
@ -975,7 +971,6 @@ ZEND_FUNCTION(get_object_vars)
|
||||||
zend_string *key;
|
zend_string *key;
|
||||||
const char *prop_name, *class_name;
|
const char *prop_name, *class_name;
|
||||||
uint prop_len;
|
uint prop_len;
|
||||||
ulong num_index;
|
|
||||||
zend_object *zobj;
|
zend_object *zobj;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) {
|
||||||
|
@ -996,7 +991,7 @@ ZEND_FUNCTION(get_object_vars)
|
||||||
|
|
||||||
array_init(return_value);
|
array_init(return_value);
|
||||||
|
|
||||||
ZEND_HASH_FOREACH_KEY_VAL_IND(properties, num_index, key, value) {
|
ZEND_HASH_FOREACH_STR_KEY_VAL_IND(properties, key, value) {
|
||||||
if (key) {
|
if (key) {
|
||||||
if (zend_check_property_access(zobj, key TSRMLS_CC) == SUCCESS) {
|
if (zend_check_property_access(zobj, key TSRMLS_CC) == SUCCESS) {
|
||||||
/* Not separating references */
|
/* Not separating references */
|
||||||
|
@ -1030,7 +1025,6 @@ ZEND_FUNCTION(get_class_methods)
|
||||||
zend_class_entry *ce = NULL;
|
zend_class_entry *ce = NULL;
|
||||||
zend_function *mptr;
|
zend_function *mptr;
|
||||||
zend_string *key;
|
zend_string *key;
|
||||||
ulong num_index;
|
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &klass) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &klass) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
|
@ -1052,7 +1046,7 @@ ZEND_FUNCTION(get_class_methods)
|
||||||
|
|
||||||
array_init(return_value);
|
array_init(return_value);
|
||||||
|
|
||||||
ZEND_HASH_FOREACH_KEY_PTR(&ce->function_table, num_index, key, mptr) {
|
ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->function_table, key, mptr) {
|
||||||
|
|
||||||
if ((mptr->common.fn_flags & ZEND_ACC_PUBLIC)
|
if ((mptr->common.fn_flags & ZEND_ACC_PUBLIC)
|
||||||
|| (EG(scope) &&
|
|| (EG(scope) &&
|
||||||
|
@ -1422,14 +1416,13 @@ ZEND_FUNCTION(crash)
|
||||||
ZEND_FUNCTION(get_included_files)
|
ZEND_FUNCTION(get_included_files)
|
||||||
{
|
{
|
||||||
zend_string *entry;
|
zend_string *entry;
|
||||||
ulong num_idx;
|
|
||||||
|
|
||||||
if (zend_parse_parameters_none() == FAILURE) {
|
if (zend_parse_parameters_none() == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
array_init(return_value);
|
array_init(return_value);
|
||||||
ZEND_HASH_FOREACH_KEY(&EG(included_files), num_idx, entry) {
|
ZEND_HASH_FOREACH_STR_KEY(&EG(included_files), entry) {
|
||||||
if (entry) {
|
if (entry) {
|
||||||
add_next_index_str(return_value, STR_COPY(entry));
|
add_next_index_str(return_value, STR_COPY(entry));
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,7 +309,6 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result,
|
||||||
const char *colon;
|
const char *colon;
|
||||||
zend_class_entry *ce = NULL;
|
zend_class_entry *ce = NULL;
|
||||||
zend_string *class_name;
|
zend_string *class_name;
|
||||||
zval *ret_constant;
|
|
||||||
|
|
||||||
/* Skip leading \\ */
|
/* Skip leading \\ */
|
||||||
if (name[0] == '\\') {
|
if (name[0] == '\\') {
|
||||||
|
@ -317,13 +316,13 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result,
|
||||||
name_len -= 1;
|
name_len -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((colon = zend_memrchr(name, ':', name_len)) &&
|
if ((colon = zend_memrchr(name, ':', name_len)) &&
|
||||||
colon > name && (*(colon - 1) == ':')) {
|
colon > name && (*(colon - 1) == ':')) {
|
||||||
int class_name_len = colon - name - 1;
|
int class_name_len = colon - name - 1;
|
||||||
int const_name_len = name_len - class_name_len - 2;
|
int const_name_len = name_len - class_name_len - 2;
|
||||||
zend_string *constant_name = STR_INIT(colon + 1, const_name_len, 0);
|
zend_string *constant_name = STR_INIT(colon + 1, const_name_len, 0);
|
||||||
zend_string *lcname;
|
zend_string *lcname;
|
||||||
|
zval *ret_constant = NULL;
|
||||||
|
|
||||||
class_name = STR_INIT(name, class_name_len, 0);
|
class_name = STR_INIT(name, class_name_len, 0);
|
||||||
lcname = STR_ALLOC(class_name_len, 0);
|
lcname = STR_ALLOC(class_name_len, 0);
|
||||||
|
@ -381,7 +380,11 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result,
|
||||||
}
|
}
|
||||||
STR_FREE(class_name);
|
STR_FREE(class_name);
|
||||||
STR_FREE(constant_name);
|
STR_FREE(constant_name);
|
||||||
goto finish;
|
if (retval) {
|
||||||
|
zval_update_constant_ex(ret_constant, (void*)1, ce TSRMLS_CC);
|
||||||
|
ZVAL_DUP(result, ret_constant);
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* non-class constant */
|
/* non-class constant */
|
||||||
|
@ -425,14 +428,7 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result,
|
||||||
name_len = const_name_len;
|
name_len = const_name_len;
|
||||||
return zend_get_constant(name, name_len, result TSRMLS_CC);
|
return zend_get_constant(name, name_len, result TSRMLS_CC);
|
||||||
}
|
}
|
||||||
retval = 0;
|
return 0;
|
||||||
finish:
|
|
||||||
if (retval) {
|
|
||||||
zval_update_constant_ex(ret_constant, (void*)1, ce TSRMLS_CC);
|
|
||||||
ZVAL_DUP(result, ret_constant);
|
|
||||||
}
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return zend_get_constant(name, name_len, result TSRMLS_CC);
|
return zend_get_constant(name, name_len, result TSRMLS_CC);
|
||||||
|
|
|
@ -382,10 +382,10 @@ static inline zval *_get_zval_ptr(int op_type, const znode_op *node, const zend_
|
||||||
return NULL;
|
return NULL;
|
||||||
break;
|
break;
|
||||||
case IS_CV:
|
case IS_CV:
|
||||||
|
default:
|
||||||
should_free->var = NULL;
|
should_free->var = NULL;
|
||||||
return _get_zval_ptr_cv(execute_data, node->var, type TSRMLS_CC);
|
return _get_zval_ptr_cv(execute_data, node->var, type TSRMLS_CC);
|
||||||
break;
|
break;
|
||||||
EMPTY_SWITCH_DEFAULT_CASE()
|
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -412,10 +412,10 @@ static inline zval *_get_zval_ptr_deref(int op_type, const znode_op *node, const
|
||||||
return NULL;
|
return NULL;
|
||||||
break;
|
break;
|
||||||
case IS_CV:
|
case IS_CV:
|
||||||
|
default:
|
||||||
should_free->var = NULL;
|
should_free->var = NULL;
|
||||||
return _get_zval_ptr_cv_deref(execute_data, node->var, type TSRMLS_CC);
|
return _get_zval_ptr_cv_deref(execute_data, node->var, type TSRMLS_CC);
|
||||||
break;
|
break;
|
||||||
EMPTY_SWITCH_DEFAULT_CASE()
|
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -438,8 +438,6 @@ static zend_always_inline zval *_get_zval_ptr_ptr_var(zend_uint var, const zend_
|
||||||
|
|
||||||
static inline zval *_get_zval_ptr_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type TSRMLS_DC)
|
static inline zval *_get_zval_ptr_ptr(int op_type, const znode_op *node, const zend_execute_data *execute_data, zend_free_op *should_free, int type TSRMLS_DC)
|
||||||
{
|
{
|
||||||
zval *ret;
|
|
||||||
|
|
||||||
if (op_type == IS_CV) {
|
if (op_type == IS_CV) {
|
||||||
should_free->var = NULL;
|
should_free->var = NULL;
|
||||||
return _get_zval_ptr_cv(execute_data, node->var, type TSRMLS_CC);
|
return _get_zval_ptr_cv(execute_data, node->var, type TSRMLS_CC);
|
||||||
|
|
|
@ -569,23 +569,42 @@ static inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht, HashPositio
|
||||||
ZEND_HASH_FOREACH(ht, 0); \
|
ZEND_HASH_FOREACH(ht, 0); \
|
||||||
_ptr = Z_PTR_P(_z);
|
_ptr = Z_PTR_P(_z);
|
||||||
|
|
||||||
|
#define ZEND_HASH_FOREACH_STR_KEY(ht, _key) \
|
||||||
|
ZEND_HASH_FOREACH(ht, 0); \
|
||||||
|
_key = _p->key;
|
||||||
|
|
||||||
#define ZEND_HASH_FOREACH_KEY(ht, _h, _key) \
|
#define ZEND_HASH_FOREACH_KEY(ht, _h, _key) \
|
||||||
ZEND_HASH_FOREACH(ht, 0); \
|
ZEND_HASH_FOREACH(ht, 0); \
|
||||||
_h = _p->h; \
|
_h = _p->h; \
|
||||||
_key = _p->key;
|
_key = _p->key;
|
||||||
|
|
||||||
|
#define ZEND_HASH_FOREACH_STR_KEY_VAL(ht, _key, _val) \
|
||||||
|
ZEND_HASH_FOREACH(ht, 0); \
|
||||||
|
_key = _p->key; \
|
||||||
|
_val = _z;
|
||||||
|
|
||||||
#define ZEND_HASH_FOREACH_KEY_VAL(ht, _h, _key, _val) \
|
#define ZEND_HASH_FOREACH_KEY_VAL(ht, _h, _key, _val) \
|
||||||
ZEND_HASH_FOREACH(ht, 0); \
|
ZEND_HASH_FOREACH(ht, 0); \
|
||||||
_h = _p->h; \
|
_h = _p->h; \
|
||||||
_key = _p->key; \
|
_key = _p->key; \
|
||||||
_val = _z;
|
_val = _z;
|
||||||
|
|
||||||
|
#define ZEND_HASH_FOREACH_STR_KEY_VAL_IND(ht, _key, _val) \
|
||||||
|
ZEND_HASH_FOREACH(ht, 1); \
|
||||||
|
_key = _p->key; \
|
||||||
|
_val = _z;
|
||||||
|
|
||||||
#define ZEND_HASH_FOREACH_KEY_VAL_IND(ht, _h, _key, _val) \
|
#define ZEND_HASH_FOREACH_KEY_VAL_IND(ht, _h, _key, _val) \
|
||||||
ZEND_HASH_FOREACH(ht, 1); \
|
ZEND_HASH_FOREACH(ht, 1); \
|
||||||
_h = _p->h; \
|
_h = _p->h; \
|
||||||
_key = _p->key; \
|
_key = _p->key; \
|
||||||
_val = _z;
|
_val = _z;
|
||||||
|
|
||||||
|
#define ZEND_HASH_FOREACH_STR_KEY_PTR(ht, _key, _ptr) \
|
||||||
|
ZEND_HASH_FOREACH(ht, 0); \
|
||||||
|
_key = _p->key; \
|
||||||
|
_ptr = Z_PTR_P(_z);
|
||||||
|
|
||||||
#define ZEND_HASH_FOREACH_KEY_PTR(ht, _h, _key, _ptr) \
|
#define ZEND_HASH_FOREACH_KEY_PTR(ht, _h, _key, _ptr) \
|
||||||
ZEND_HASH_FOREACH(ht, 0); \
|
ZEND_HASH_FOREACH(ht, 0); \
|
||||||
_h = _p->h; \
|
_h = _p->h; \
|
||||||
|
|
|
@ -329,8 +329,6 @@ static void list_destructors_dtor(zval *zv)
|
||||||
|
|
||||||
int zend_init_rsrc_list_dtors(void)
|
int zend_init_rsrc_list_dtors(void)
|
||||||
{
|
{
|
||||||
int retval;
|
|
||||||
|
|
||||||
zend_hash_init(&list_destructors, 64, NULL, list_destructors_dtor, 1);
|
zend_hash_init(&list_destructors, 64, NULL, list_destructors_dtor, 1);
|
||||||
list_destructors.nNextFreeElement=1; /* we don't want resource type 0 */
|
list_destructors.nNextFreeElement=1; /* we don't want resource type 0 */
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
|
|
|
@ -276,12 +276,12 @@ ZEND_API void zend_object_proxy_set(zval *property, zval *value TSRMLS_DC)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ZEND_API zval* zend_object_proxy_get(zval *property TSRMLS_DC)
|
ZEND_API zval* zend_object_proxy_get(zval *property, zval *rv TSRMLS_DC)
|
||||||
{
|
{
|
||||||
zend_proxy_object *probj = (zend_proxy_object*)Z_OBJ_P(property);
|
zend_proxy_object *probj = (zend_proxy_object*)Z_OBJ_P(property);
|
||||||
|
|
||||||
if (Z_OBJ_HT(probj->object) && Z_OBJ_HT(probj->object)->read_property) {
|
if (Z_OBJ_HT(probj->object) && Z_OBJ_HT(probj->object)->read_property) {
|
||||||
return Z_OBJ_HT(probj->object)->read_property(&probj->object, &probj->property, BP_VAR_R, -1, NULL TSRMLS_CC);
|
return Z_OBJ_HT(probj->object)->read_property(&probj->object, &probj->property, BP_VAR_R, -1, rv TSRMLS_CC);
|
||||||
} else {
|
} else {
|
||||||
zend_error(E_WARNING, "Cannot read property of object - no read handler defined");
|
zend_error(E_WARNING, "Cannot read property of object - no read handler defined");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1807,7 +1807,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
static int hash_zval_identical_function(const zval *z1, const zval *z2) /* {{{ */
|
static int hash_zval_identical_function(zval *z1, zval *z2) /* {{{ */
|
||||||
{
|
{
|
||||||
zval result;
|
zval result;
|
||||||
TSRMLS_FETCH();
|
TSRMLS_FETCH();
|
||||||
|
@ -2406,7 +2406,7 @@ string_cmp:
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
static int hash_zval_compare_function(const zval *z1, const zval *z2 TSRMLS_DC) /* {{{ */
|
static int hash_zval_compare_function(zval *z1, zval *z2 TSRMLS_DC) /* {{{ */
|
||||||
{
|
{
|
||||||
zval result;
|
zval result;
|
||||||
|
|
||||||
|
|
|
@ -1540,7 +1540,7 @@ ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|CV, CONST|TMP|VAR|CV)
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1, free_op2;
|
zend_free_op free_op1, free_op2;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
|
container = GET_OP1_OBJ_ZVAL_PTR_PTR(BP_VAR_UNSET);
|
||||||
|
@ -3128,11 +3128,10 @@ ZEND_VM_C_LABEL(send_again):
|
||||||
HashTable *ht = Z_ARRVAL_P(args);
|
HashTable *ht = Z_ARRVAL_P(args);
|
||||||
zval *arg;
|
zval *arg;
|
||||||
zend_string *name;
|
zend_string *name;
|
||||||
zend_ulong index;
|
|
||||||
|
|
||||||
ZEND_VM_STACK_GROW_IF_NEEDED(zend_hash_num_elements(ht));
|
ZEND_VM_STACK_GROW_IF_NEEDED(zend_hash_num_elements(ht));
|
||||||
|
|
||||||
ZEND_HASH_FOREACH_KEY_VAL(ht, index, name, arg) {
|
ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
|
||||||
if (name) {
|
if (name) {
|
||||||
zend_error(E_RECOVERABLE_ERROR, "Cannot unpack array with string keys");
|
zend_error(E_RECOVERABLE_ERROR, "Cannot unpack array with string keys");
|
||||||
FREE_OP1();
|
FREE_OP1();
|
||||||
|
|
|
@ -724,11 +724,10 @@ send_again:
|
||||||
HashTable *ht = Z_ARRVAL_P(args);
|
HashTable *ht = Z_ARRVAL_P(args);
|
||||||
zval *arg;
|
zval *arg;
|
||||||
zend_string *name;
|
zend_string *name;
|
||||||
zend_ulong index;
|
|
||||||
|
|
||||||
ZEND_VM_STACK_GROW_IF_NEEDED(zend_hash_num_elements(ht));
|
ZEND_VM_STACK_GROW_IF_NEEDED(zend_hash_num_elements(ht));
|
||||||
|
|
||||||
ZEND_HASH_FOREACH_KEY_VAL(ht, index, name, arg) {
|
ZEND_HASH_FOREACH_STR_KEY_VAL(ht, name, arg) {
|
||||||
if (name) {
|
if (name) {
|
||||||
zend_error(E_RECOVERABLE_ERROR, "Cannot unpack array with string keys");
|
zend_error(E_RECOVERABLE_ERROR, "Cannot unpack array with string keys");
|
||||||
FREE_OP(free_op1);
|
FREE_OP(free_op1);
|
||||||
|
@ -14584,7 +14583,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCOD
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1;
|
zend_free_op free_op1;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
|
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
|
||||||
|
@ -16747,7 +16746,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1, free_op2;
|
zend_free_op free_op1, free_op2;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
|
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
|
||||||
|
@ -18814,7 +18813,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1, free_op2;
|
zend_free_op free_op1, free_op2;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
|
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
|
||||||
|
@ -22090,7 +22089,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_H
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1;
|
zend_free_op free_op1;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
|
container = _get_zval_ptr_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
|
||||||
|
@ -23732,7 +23731,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CONST_HANDLER(ZEND_OP
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1;
|
zend_free_op free_op1;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_obj_zval_ptr_unused(TSRMLS_C);
|
container = _get_obj_zval_ptr_unused(TSRMLS_C);
|
||||||
|
@ -25060,7 +25059,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCO
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1, free_op2;
|
zend_free_op free_op1, free_op2;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_obj_zval_ptr_unused(TSRMLS_C);
|
container = _get_obj_zval_ptr_unused(TSRMLS_C);
|
||||||
|
@ -26301,7 +26300,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCO
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1, free_op2;
|
zend_free_op free_op1, free_op2;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_obj_zval_ptr_unused(TSRMLS_C);
|
container = _get_obj_zval_ptr_unused(TSRMLS_C);
|
||||||
|
@ -28031,7 +28030,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV_HANDLER(ZEND_OPCOD
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1;
|
zend_free_op free_op1;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_obj_zval_ptr_unused(TSRMLS_C);
|
container = _get_obj_zval_ptr_unused(TSRMLS_C);
|
||||||
|
@ -31069,7 +31068,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1;
|
zend_free_op free_op1;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
|
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
|
||||||
|
@ -33019,7 +33018,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_H
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1, free_op2;
|
zend_free_op free_op1, free_op2;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
|
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
|
||||||
|
@ -34969,7 +34968,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_H
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1, free_op2;
|
zend_free_op free_op1, free_op2;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
|
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
|
||||||
|
@ -37993,7 +37992,7 @@ static int ZEND_FASTCALL ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HA
|
||||||
{
|
{
|
||||||
USE_OPLINE
|
USE_OPLINE
|
||||||
zend_free_op free_op1;
|
zend_free_op free_op1;
|
||||||
zval *container, *property, *retval_ptr;
|
zval *container, *property;
|
||||||
|
|
||||||
SAVE_OPLINE();
|
SAVE_OPLINE();
|
||||||
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
|
container = _get_zval_ptr_cv_BP_VAR_UNSET(execute_data, opline->op1.var TSRMLS_CC);
|
||||||
|
|
|
@ -2503,7 +2503,7 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str,
|
||||||
timelib_error_container *err = NULL;
|
timelib_error_container *err = NULL;
|
||||||
int type = TIMELIB_ZONETYPE_ID, new_dst = 0;
|
int type = TIMELIB_ZONETYPE_ID, new_dst = 0;
|
||||||
char *new_abbr = NULL;
|
char *new_abbr = NULL;
|
||||||
timelib_sll new_offset;
|
timelib_sll new_offset = 0;
|
||||||
|
|
||||||
if (dateobj->time) {
|
if (dateobj->time) {
|
||||||
timelib_time_dtor(dateobj->time);
|
timelib_time_dtor(dateobj->time);
|
||||||
|
@ -4016,7 +4016,7 @@ zval *date_interval_read_property(zval *object, zval *member, int type, zend_uin
|
||||||
void date_interval_write_property(zval *object, zval *member, zval *value, zend_uint cache_slot TSRMLS_DC)
|
void date_interval_write_property(zval *object, zval *member, zval *value, zend_uint cache_slot TSRMLS_DC)
|
||||||
{
|
{
|
||||||
php_interval_obj *obj;
|
php_interval_obj *obj;
|
||||||
zval tmp_member, tmp_value;
|
zval tmp_member;
|
||||||
|
|
||||||
if (Z_TYPE_P(member) != IS_STRING) {
|
if (Z_TYPE_P(member) != IS_STRING) {
|
||||||
tmp_member = *member;
|
tmp_member = *member;
|
||||||
|
|
|
@ -478,7 +478,7 @@ static void _php_list_set_error_structure(xmlErrorPtr error, const char *msg)
|
||||||
error_copy.int1 = 0;
|
error_copy.int1 = 0;
|
||||||
error_copy.int2 = 0;
|
error_copy.int2 = 0;
|
||||||
error_copy.ctxt = NULL;
|
error_copy.ctxt = NULL;
|
||||||
error_copy.message = xmlStrdup(msg);
|
error_copy.message = (char*)xmlStrdup((xmlChar*)msg);
|
||||||
error_copy.file = NULL;
|
error_copy.file = NULL;
|
||||||
error_copy.str1 = NULL;
|
error_copy.str1 = NULL;
|
||||||
error_copy.str2 = NULL;
|
error_copy.str2 = NULL;
|
||||||
|
|
|
@ -96,7 +96,7 @@ static void optimizer_compact_literals(zend_op_array *op_array TSRMLS_DC)
|
||||||
int l_false = -1;
|
int l_false = -1;
|
||||||
int l_true = -1;
|
int l_true = -1;
|
||||||
HashTable hash;
|
HashTable hash;
|
||||||
zend_string *key;
|
zend_string *key = NULL;
|
||||||
|
|
||||||
if (op_array->last_literal) {
|
if (op_array->last_literal) {
|
||||||
info = (literal_info*)ecalloc(op_array->last_literal, sizeof(literal_info));
|
info = (literal_info*)ecalloc(op_array->last_literal, sizeof(literal_info));
|
||||||
|
|
|
@ -1008,7 +1008,7 @@ PHPAPI zend_string *php_pcre_replace_impl(pcre_cache_entry *pce, char *subject,
|
||||||
*match, /* The current match */
|
*match, /* The current match */
|
||||||
*piece, /* The current piece of subject */
|
*piece, /* The current piece of subject */
|
||||||
*replace_end=NULL, /* End of replacement string */
|
*replace_end=NULL, /* End of replacement string */
|
||||||
*eval_result, /* Result of eval or custom function */
|
*eval_result=NULL, /* Result of eval or custom function */
|
||||||
walk_last; /* Last walked character */
|
walk_last; /* Last walked character */
|
||||||
int rc,
|
int rc,
|
||||||
result_len; /* Length of result */
|
result_len; /* Length of result */
|
||||||
|
|
|
@ -98,12 +98,15 @@ ZEND_DECLARE_MODULE_GLOBALS(reflection)
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GET_REFLECTION_OBJECT_PTR(target) \
|
#define GET_REFLECTION_OBJECT() \
|
||||||
intern = Z_REFLECTION_P(getThis()); \
|
intern = Z_REFLECTION_P(getThis()); \
|
||||||
if (intern == NULL || intern->ptr == NULL) { \
|
if (intern == NULL || intern->ptr == NULL) { \
|
||||||
RETURN_ON_EXCEPTION \
|
RETURN_ON_EXCEPTION \
|
||||||
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Failed to retrieve the reflection object"); \
|
php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Failed to retrieve the reflection object"); \
|
||||||
} \
|
} \
|
||||||
|
|
||||||
|
#define GET_REFLECTION_OBJECT_PTR(target) \
|
||||||
|
GET_REFLECTION_OBJECT() \
|
||||||
target = intern->ptr; \
|
target = intern->ptr; \
|
||||||
|
|
||||||
/* Class constants */
|
/* Class constants */
|
||||||
|
@ -1679,13 +1682,12 @@ ZEND_METHOD(reflection_function, isClosure)
|
||||||
ZEND_METHOD(reflection_function, getClosureThis)
|
ZEND_METHOD(reflection_function, getClosureThis)
|
||||||
{
|
{
|
||||||
reflection_object *intern;
|
reflection_object *intern;
|
||||||
zend_function *fptr;
|
|
||||||
zval* closure_this;
|
zval* closure_this;
|
||||||
|
|
||||||
if (zend_parse_parameters_none() == FAILURE) {
|
if (zend_parse_parameters_none() == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GET_REFLECTION_OBJECT_PTR(fptr);
|
GET_REFLECTION_OBJECT();
|
||||||
if (!ZVAL_IS_UNDEF(&intern->obj)) {
|
if (!ZVAL_IS_UNDEF(&intern->obj)) {
|
||||||
closure_this = zend_get_closure_this_ptr(&intern->obj TSRMLS_CC);
|
closure_this = zend_get_closure_this_ptr(&intern->obj TSRMLS_CC);
|
||||||
if (!ZVAL_IS_UNDEF(closure_this)) {
|
if (!ZVAL_IS_UNDEF(closure_this)) {
|
||||||
|
@ -1700,13 +1702,12 @@ ZEND_METHOD(reflection_function, getClosureThis)
|
||||||
ZEND_METHOD(reflection_function, getClosureScopeClass)
|
ZEND_METHOD(reflection_function, getClosureScopeClass)
|
||||||
{
|
{
|
||||||
reflection_object *intern;
|
reflection_object *intern;
|
||||||
zend_function *fptr;
|
|
||||||
const zend_function *closure_func;
|
const zend_function *closure_func;
|
||||||
|
|
||||||
if (zend_parse_parameters_none() == FAILURE) {
|
if (zend_parse_parameters_none() == FAILURE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
GET_REFLECTION_OBJECT_PTR(fptr);
|
GET_REFLECTION_OBJECT();
|
||||||
if (!ZVAL_IS_UNDEF(&intern->obj)) {
|
if (!ZVAL_IS_UNDEF(&intern->obj)) {
|
||||||
closure_func = zend_get_closure_method_def(&intern->obj TSRMLS_CC);
|
closure_func = zend_get_closure_method_def(&intern->obj TSRMLS_CC);
|
||||||
if (closure_func && closure_func->common.scope) {
|
if (closure_func && closure_func->common.scope) {
|
||||||
|
|
|
@ -326,12 +326,12 @@ static void spl_ptr_llist_shift(spl_ptr_llist *llist, zval *ret TSRMLS_DC) /* {{
|
||||||
static void spl_ptr_llist_copy(spl_ptr_llist *from, spl_ptr_llist *to TSRMLS_DC) /* {{{ */
|
static void spl_ptr_llist_copy(spl_ptr_llist *from, spl_ptr_llist *to TSRMLS_DC) /* {{{ */
|
||||||
{
|
{
|
||||||
spl_ptr_llist_element *current = from->head, *next;
|
spl_ptr_llist_element *current = from->head, *next;
|
||||||
spl_ptr_llist_ctor_func ctor = from->ctor;
|
//??? spl_ptr_llist_ctor_func ctor = from->ctor;
|
||||||
|
|
||||||
while (current) {
|
while (current) {
|
||||||
next = current->next;
|
next = current->next;
|
||||||
|
|
||||||
/*!! FIXME
|
/*??? FIXME
|
||||||
if (ctor) {
|
if (ctor) {
|
||||||
ctor(current TSRMLS_CC);
|
ctor(current TSRMLS_CC);
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,7 @@ spl_SplObjectStorageElement *spl_object_storage_attach(spl_SplObjectStorage *int
|
||||||
zend_string *hash = spl_object_storage_get_hash(intern, this, obj TSRMLS_CC);
|
zend_string *hash = spl_object_storage_get_hash(intern, this, obj TSRMLS_CC);
|
||||||
|
|
||||||
if (!hash) {
|
if (!hash) {
|
||||||
return;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pelement = spl_object_storage_get(intern, hash TSRMLS_CC);
|
pelement = spl_object_storage_get(intern, hash TSRMLS_CC);
|
||||||
|
@ -419,7 +419,7 @@ static int spl_object_storage_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return zend_hash_compare(&(Z_SPLOBJSTORAGE_P(o1))->storage, &(Z_SPLOBJSTORAGE_P(o2))->storage, spl_object_storage_compare_info, 0 TSRMLS_CC);
|
return zend_hash_compare(&(Z_SPLOBJSTORAGE_P(o1))->storage, &(Z_SPLOBJSTORAGE_P(o2))->storage, (compare_func_t)spl_object_storage_compare_info, 0 TSRMLS_CC);
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
@ -799,7 +799,6 @@ SPL_METHOD(SplObjectStorage, unserialize)
|
||||||
zval entry, pmembers, pcount, inf;
|
zval entry, pmembers, pcount, inf;
|
||||||
spl_SplObjectStorageElement *element;
|
spl_SplObjectStorageElement *element;
|
||||||
long count;
|
long count;
|
||||||
HashPosition pos;
|
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &buf, &buf_len) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &buf, &buf_len) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2633,6 +2633,8 @@ PHP_FUNCTION(array_column)
|
||||||
{
|
{
|
||||||
zval *zcolumn = NULL, *zkey = NULL, *data;
|
zval *zcolumn = NULL, *zkey = NULL, *data;
|
||||||
HashTable *arr_hash;
|
HashTable *arr_hash;
|
||||||
|
zval *zcolval = NULL, *zkeyval = NULL;
|
||||||
|
HashTable *ht;
|
||||||
|
|
||||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "hz!|z!", &arr_hash, &zcolumn, &zkey) == FAILURE) {
|
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "hz!|z!", &arr_hash, &zcolumn, &zkey) == FAILURE) {
|
||||||
return;
|
return;
|
||||||
|
@ -2645,9 +2647,6 @@ PHP_FUNCTION(array_column)
|
||||||
|
|
||||||
array_init(return_value);
|
array_init(return_value);
|
||||||
ZEND_HASH_FOREACH_VAL(arr_hash, data) {
|
ZEND_HASH_FOREACH_VAL(arr_hash, data) {
|
||||||
zval *zcolval, *zkeyval = NULL;
|
|
||||||
HashTable *ht;
|
|
||||||
|
|
||||||
if (Z_TYPE_P(data) != IS_ARRAY) {
|
if (Z_TYPE_P(data) != IS_ARRAY) {
|
||||||
/* Skip elemens which are not sub-arrays */
|
/* Skip elemens which are not sub-arrays */
|
||||||
continue;
|
continue;
|
||||||
|
@ -4506,7 +4505,7 @@ PHP_FUNCTION(array_key_exists)
|
||||||
Split array into chunks */
|
Split array into chunks */
|
||||||
PHP_FUNCTION(array_chunk)
|
PHP_FUNCTION(array_chunk)
|
||||||
{
|
{
|
||||||
int argc = ZEND_NUM_ARGS(), key_type, num_in;
|
int argc = ZEND_NUM_ARGS(), num_in;
|
||||||
long size, current = 0;
|
long size, current = 0;
|
||||||
zend_string *str_key;
|
zend_string *str_key;
|
||||||
ulong num_key;
|
ulong num_key;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
PHP_NAMED_FUNCTION(php_if_crc32)
|
PHP_NAMED_FUNCTION(php_if_crc32)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
int len, nr;
|
int nr;
|
||||||
php_uint32 crcinit = 0;
|
php_uint32 crcinit = 0;
|
||||||
register php_uint32 crc;
|
register php_uint32 crc;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ PHP_NAMED_FUNCTION(php_if_crc32)
|
||||||
}
|
}
|
||||||
crc = crcinit^0xFFFFFFFF;
|
crc = crcinit^0xFFFFFFFF;
|
||||||
|
|
||||||
for (len =+nr; nr--; ++p) {
|
for (; nr--; ++p) {
|
||||||
crc = ((crc >> 8) & 0x00FFFFFF) ^ crc32tab[(crc ^ (*p)) & 0xFF ];
|
crc = ((crc >> 8) & 0x00FFFFFF) ^ crc32tab[(crc ^ (*p)) & 0xFF ];
|
||||||
}
|
}
|
||||||
RETVAL_LONG(crc^0xFFFFFFFF);
|
RETVAL_LONG(crc^0xFFFFFFFF);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue