Skip to content

Commit e11fbd9

Browse files
committed
next wave of revamp in Zend
1 parent 94fcc9e commit e11fbd9

12 files changed

+14
-13
lines changed

Zend/zend_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3430,7 +3430,7 @@ ZEND_API int zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *f
34303430
ZEND_API const char *zend_get_module_version(const char *module_name) /* {{{ */
34313431
{
34323432
char *lname;
3433-
int name_len = strlen(module_name);
3433+
zend_size_t name_len = strlen(module_name);
34343434
zend_module_entry *module;
34353435

34363436
lname = zend_str_tolower_dup(module_name, name_len);

Zend/zend_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,7 @@ static void zend_mm_safe_error(zend_mm_heap *heap,
17451745
size_t limit,
17461746
#if ZEND_DEBUG
17471747
const char *filename,
1748-
uint lineno,
1748+
zend_uint_t lineno,
17491749
#endif
17501750
size_t size)
17511751
{

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ ZEND_API char *zend_get_compiled_filename(TSRMLS_D) /* {{{ */
271271
}
272272
/* }}} */
273273

274-
ZEND_API zend_size_t zend_get_compiled_lineno(TSRMLS_D) /* {{{ */
274+
ZEND_API zend_uint_t zend_get_compiled_lineno(TSRMLS_D) /* {{{ */
275275
{
276276
return CG(zend_lineno);
277277
}

Zend/zend_compile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ void shutdown_scanner(TSRMLS_D);
445445
ZEND_API char *zend_set_compiled_filename(const char *new_compiled_filename TSRMLS_DC);
446446
ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename TSRMLS_DC);
447447
ZEND_API char *zend_get_compiled_filename(TSRMLS_D);
448-
ZEND_API zend_size_t zend_get_compiled_lineno(TSRMLS_D);
448+
ZEND_API zend_uint_t zend_get_compiled_lineno(TSRMLS_D);
449449
ZEND_API size_t zend_get_scanned_file_offset(TSRMLS_D);
450450

451451
void zend_resolve_non_class_name(znode *element_name, zend_bool *check_namespace, zend_bool case_sensitive, HashTable *current_import_sub TSRMLS_DC);
@@ -715,7 +715,7 @@ int zend_get_class_fetch_type(const char *class_name, zend_size_t class_name_len
715715
typedef zend_bool (*zend_auto_global_callback)(const char *name, zend_size_t name_len TSRMLS_DC);
716716
typedef struct _zend_auto_global {
717717
const char *name;
718-
uint name_len;
718+
zend_size_t name_len;
719719
zend_auto_global_callback auto_global_callback;
720720
zend_bool jit;
721721
zend_bool armed;

Zend/zend_exceptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ static int _build_trace_string(zval **frame TSRMLS_DC, int num_args, va_list arg
510510
TRACE_APPEND_CHR('(');
511511
if (zend_hash_find(ht, "args", sizeof("args"), (void**)&tmp) == SUCCESS) {
512512
if (Z_TYPE_PP(tmp) == IS_ARRAY) {
513-
int last_len = *len;
513+
zend_size_t last_len = *len;
514514
zend_hash_apply_with_arguments(Z_ARRVAL_PP(tmp) TSRMLS_CC, (apply_func_args_t)_build_trace_args, 2, str, len);
515515
if (last_len != *len) {
516516
*len -= 2; /* remove last ', ' */

Zend/zend_globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ struct _zend_compiler_globals {
8787

8888
char *compiled_filename;
8989

90-
int zend_lineno;
90+
zend_uint_t zend_lineno;
9191

9292
zend_op_array *active_op_array;
9393

Zend/zend_ini.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,8 @@ static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type) /* {{{ */
460460

461461
ZEND_INI_DISP(zend_ini_boolean_displayer_cb) /* {{{ */
462462
{
463-
int value, tmp_value_len;
463+
int value;
464+
zend_size_t tmp_value_len;
464465
char *tmp_value;
465466

466467
if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {

Zend/zend_llist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_ar
249249
}
250250

251251

252-
ZEND_API int zend_llist_count(zend_llist *l)
252+
ZEND_API size_t zend_llist_count(zend_llist *l)
253253
{
254254
return l->count;
255255
}

Zend/zend_llist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ZEND_API void zend_llist_apply(zend_llist *l, llist_apply_func_t func TSRMLS_DC)
5959
ZEND_API void zend_llist_apply_with_del(zend_llist *l, int (*func)(void *data));
6060
ZEND_API void zend_llist_apply_with_argument(zend_llist *l, llist_apply_with_arg_func_t func, void *arg TSRMLS_DC);
6161
ZEND_API void zend_llist_apply_with_arguments(zend_llist *l, llist_apply_with_args_func_t func TSRMLS_DC, int num_args, ...);
62-
ZEND_API int zend_llist_count(zend_llist *l);
62+
ZEND_API size_t zend_llist_count(zend_llist *l);
6363
ZEND_API void zend_llist_sort(zend_llist *l, llist_compare_func_t comp_func TSRMLS_DC);
6464

6565
/* traversal */

Zend/zend_object_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ ZEND_API void zend_std_callstatic_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{
11241124
}
11251125
/* }}} */
11261126

1127-
static inline union _zend_function *zend_get_user_callstatic_function(zend_class_entry *ce, const char *method_name, int method_len) /* {{{ */
1127+
static inline union _zend_function *zend_get_user_callstatic_function(zend_class_entry *ce, const char *method_name, zend_size_t method_len) /* {{{ */
11281128
{
11291129
zend_internal_function *callstatic_user_call = emalloc(sizeof(zend_internal_function));
11301130
callstatic_user_call->type = ZEND_INTERNAL_FUNCTION;

Zend/zend_variables.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
157157
}
158158

159159

160-
ZEND_API int zend_print_variable(zval *var)
160+
ZEND_API zend_size_t zend_print_variable(zval *var)
161161
{
162162
return zend_print_zval(var, 0);
163163
}

Zend/zend_variables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static zend_always_inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
4747

4848
ZEND_API int zval_copy_static_var(zval **p TSRMLS_DC, int num_args, va_list args, zend_hash_key *key);
4949

50-
ZEND_API int zend_print_variable(zval *var);
50+
ZEND_API zend_size_t zend_print_variable(zval *var);
5151
ZEND_API void _zval_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC);
5252
ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC);
5353
ZEND_API void _zval_internal_ptr_dtor(zval **zvalue ZEND_FILE_LINE_DC);

0 commit comments

Comments
 (0)