Skip to content

Commit 6f9f0bf

Browse files
committed
master renames phase 2
1 parent c3e3c98 commit 6f9f0bf

Some content is hidden

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

64 files changed

+461
-463
lines changed

Zend/zend.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ ZEND_API int zend_make_printable_zval(zval *expr, zval *expr_copy TSRMLS_DC) /*
226226
break;
227227
case IS_TRUE:
228228
if (CG(one_char_string)['1']) {
229-
ZVAL_LONG_STR(expr_copy, CG(one_char_string)['1']);
229+
ZVAL_INTERNED_STR(expr_copy, CG(one_char_string)['1']);
230230
} else {
231231
ZVAL_NEW_STR(expr_copy, zend_string_init("1", 1, 0));
232232
}
@@ -443,7 +443,7 @@ static FILE *zend_fopen_wrapper(const char *filename, char **opened_path TSRMLS_
443443
#ifdef ZTS
444444
static zend_bool asp_tags_default = 0;
445445
static zend_bool short_tags_default = 1;
446-
static zend_uint compiler_options_default = ZEND_COMPILE_DEFAULT;
446+
static uint32_t compiler_options_default = ZEND_COMPILE_DEFAULT;
447447
#else
448448
# define asp_tags_default 0
449449
# define short_tags_default 1

Zend/zend.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ typedef enum {
293293
#include "zend_hash.h"
294294
#include "zend_llist.h"
295295

296-
#define INTERNAL_FUNCTION_PARAMETERS zend_uint param_count, zval *return_value TSRMLS_DC
296+
#define INTERNAL_FUNCTION_PARAMETERS uint32_t param_count, zval *return_value TSRMLS_DC
297297
#define INTERNAL_FUNCTION_PARAM_PASSTHRU param_count, return_value TSRMLS_CC
298298

299299
#define USED_RET() \
@@ -402,22 +402,22 @@ void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((nore
402402

403403
#include "zend_string.h"
404404

405-
static zend_always_inline zend_uint zval_refcount_p(zval* pz) {
405+
static zend_always_inline uint32_t zval_refcount_p(zval* pz) {
406406
ZEND_ASSERT(Z_REFCOUNTED_P(pz) || Z_IMMUTABLE_P(pz));
407407
return GC_REFCOUNT(Z_COUNTED_P(pz));
408408
}
409409

410-
static zend_always_inline zend_uint zval_set_refcount_p(zval* pz, zend_uint rc) {
410+
static zend_always_inline uint32_t zval_set_refcount_p(zval* pz, uint32_t rc) {
411411
ZEND_ASSERT(Z_REFCOUNTED_P(pz));
412412
return GC_REFCOUNT(Z_COUNTED_P(pz)) = rc;
413413
}
414414

415-
static zend_always_inline zend_uint zval_addref_p(zval* pz) {
415+
static zend_always_inline uint32_t zval_addref_p(zval* pz) {
416416
ZEND_ASSERT(Z_REFCOUNTED_P(pz));
417417
return ++GC_REFCOUNT(Z_COUNTED_P(pz));
418418
}
419419

420-
static zend_always_inline zend_uint zval_delref_p(zval* pz) {
420+
static zend_always_inline uint32_t zval_delref_p(zval* pz) {
421421
ZEND_ASSERT(Z_REFCOUNTED_P(pz));
422422
return --GC_REFCOUNT(Z_COUNTED_P(pz));
423423
}
@@ -463,7 +463,7 @@ struct _zend_trait_alias {
463463
/**
464464
* modifiers to be set on trait method
465465
*/
466-
zend_uint modifiers;
466+
uint32_t modifiers;
467467
};
468468
typedef struct _zend_trait_alias zend_trait_alias;
469469

@@ -472,7 +472,7 @@ struct _zend_class_entry {
472472
zend_string *name;
473473
struct _zend_class_entry *parent;
474474
int refcount;
475-
zend_uint ce_flags;
475+
uint32_t ce_flags;
476476

477477
HashTable function_table;
478478
HashTable properties_info;
@@ -506,22 +506,22 @@ struct _zend_class_entry {
506506
union _zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method TSRMLS_DC);
507507

508508
/* serializer callbacks */
509-
int (*serialize)(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC);
510-
int (*unserialize)(zval *object, zend_class_entry *ce, const unsigned char *buf, zend_uint buf_len, zend_unserialize_data *data TSRMLS_DC);
509+
int (*serialize)(zval *object, unsigned char **buffer, uint32_t *buf_len, zend_serialize_data *data TSRMLS_DC);
510+
int (*unserialize)(zval *object, zend_class_entry *ce, const unsigned char *buf, uint32_t buf_len, zend_unserialize_data *data TSRMLS_DC);
511511

512512
zend_class_entry **interfaces;
513-
zend_uint num_interfaces;
513+
uint32_t num_interfaces;
514514

515515
zend_class_entry **traits;
516-
zend_uint num_traits;
516+
uint32_t num_traits;
517517
zend_trait_alias **trait_aliases;
518518
zend_trait_precedence **trait_precedences;
519519

520520
union {
521521
struct {
522522
zend_string *filename;
523-
zend_uint line_start;
524-
zend_uint line_end;
523+
uint32_t line_start;
524+
uint32_t line_end;
525525
zend_string *doc_comment;
526526
} user;
527527
struct {

Zend/zend_API.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2657,7 +2657,7 @@ int zend_next_free_module(void) /* {{{ */
26572657
}
26582658
/* }}} */
26592659

2660-
static zend_class_entry *do_register_internal_class(zend_class_entry *orig_class_entry, zend_uint ce_flags TSRMLS_DC) /* {{{ */
2660+
static zend_class_entry *do_register_internal_class(zend_class_entry *orig_class_entry, uint32_t ce_flags TSRMLS_DC) /* {{{ */
26612661
{
26622662
zend_class_entry *class_entry = malloc(sizeof(zend_class_entry));
26632663
zend_string *lowercase_name = zend_string_alloc(orig_class_entry->name->len, 1);

Zend/zend_API.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ typedef struct _zend_function_entry {
3636
const char *fname;
3737
void (*handler)(INTERNAL_FUNCTION_PARAMETERS);
3838
const struct _zend_arg_info *arg_info;
39-
zend_uint num_args;
40-
zend_uint flags;
39+
uint32_t num_args;
40+
uint32_t flags;
4141
} zend_function_entry;
4242

4343
typedef struct _zend_fcall_info {
@@ -46,7 +46,7 @@ typedef struct _zend_fcall_info {
4646
zval function_name;
4747
zend_array *symbol_table;
4848
zval *retval;
49-
zend_uint param_count;
49+
uint32_t param_count;
5050
zval *params;
5151
zend_object *object;
5252
zend_bool no_separation;
@@ -68,9 +68,9 @@ typedef struct _zend_fcall_info_cache {
6868
#define ZEND_FUNCTION(name) ZEND_NAMED_FUNCTION(ZEND_FN(name))
6969
#define ZEND_METHOD(classname, name) ZEND_NAMED_FUNCTION(ZEND_MN(classname##_##name))
7070

71-
#define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
71+
#define ZEND_FENTRY(zend_name, name, arg_info, flags) { #zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
7272

73-
#define ZEND_RAW_FENTRY(zend_name, name, arg_info, flags) { zend_name, name, arg_info, (zend_uint) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
73+
#define ZEND_RAW_FENTRY(zend_name, name, arg_info, flags) { zend_name, name, arg_info, (uint32_t) (sizeof(arg_info)/sizeof(struct _zend_arg_info)-1), flags },
7474
#define ZEND_RAW_NAMED_FE(zend_name, name, arg_info) ZEND_RAW_FENTRY(#zend_name, name, arg_info, 0)
7575

7676
#define ZEND_NAMED_FE(zend_name, name, arg_info) ZEND_FENTRY(zend_name, name, arg_info, 0)
@@ -455,8 +455,8 @@ ZEND_API int add_property_zval_ex(zval *arg, const char *key, uint key_len, zval
455455
#define add_property_zval(__arg, __key, __value) add_property_zval_ex(__arg, __key, strlen(__key), __value TSRMLS_CC)
456456

457457

458-
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, zend_uint param_count, zval params[] TSRMLS_DC);
459-
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, zend_uint param_count, zval params[], int no_separation, zend_array *symbol_table TSRMLS_DC);
458+
ZEND_API int call_user_function(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[] TSRMLS_DC);
459+
ZEND_API int call_user_function_ex(HashTable *function_table, zval *object, zval *function_name, zval *retval_ptr, uint32_t param_count, zval params[], int no_separation, zend_array *symbol_table TSRMLS_DC);
460460

461461
ZEND_API extern const zend_fcall_info empty_fcall_info;
462462
ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
@@ -560,7 +560,7 @@ END_EXTERN_C()
560560
} while (0)
561561

562562
#define ZVAL_EMPTY_STRING(z) do { \
563-
ZVAL_LONG_STR(z, STR_EMPTY_ALLOC()); \
563+
ZVAL_INTERNED_STR(z, STR_EMPTY_ALLOC()); \
564564
} while (0)
565565

566566
#define ZVAL_PSTRINGL(z, s, l) do { \
@@ -601,7 +601,7 @@ END_EXTERN_C()
601601
#define RETVAL_LONG(l) ZVAL_LONG(return_value, l)
602602
#define RETVAL_DOUBLE(d) ZVAL_DOUBLE(return_value, d)
603603
#define RETVAL_STR(s) ZVAL_STR(return_value, s)
604-
#define RETVAL_LONG_STR(s) ZVAL_LONG_STR(return_value, s)
604+
#define RETVAL_LONG_STR(s) ZVAL_INTERNED_STR(return_value, s)
605605
#define RETVAL_NEW_STR(s) ZVAL_NEW_STR(return_value, s)
606606
#define RETVAL_STRING(s) ZVAL_STRING(return_value, s)
607607
#define RETVAL_STRINGL(s, l) ZVAL_STRINGL(return_value, s, l)

Zend/zend_alloc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,7 @@ static void zend_mm_check_leaks(zend_mm_heap *heap TSRMLS_DC)
12761276
{
12771277
zend_mm_segment *segment = heap->segments_list;
12781278
zend_mm_block *p, *q;
1279-
zend_uint total = 0;
1279+
uint32_t total = 0;
12801280

12811281
if (!segment) {
12821282
return;

Zend/zend_builtin_functions.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ ZEND_FUNCTION(get_object_vars)
10801080
}
10811081
/* }}} */
10821082

1083-
static int same_name(const char *key, const char *name, zend_uint name_len)
1083+
static int same_name(const char *key, const char *name, uint32_t name_len)
10841084
{
10851085
char *lcname = zend_str_tolower_dup(name, name_len);
10861086
int ret = memcmp(lcname, key, name_len) == 0;
@@ -1694,9 +1694,9 @@ static int copy_class_or_interface_name(zval *el TSRMLS_DC, int num_args, va_lis
16941694
{
16951695
zend_class_entry *ce = (zend_class_entry *)Z_PTR_P(el);
16961696
zval *array = va_arg(args, zval *);
1697-
zend_uint mask = va_arg(args, zend_uint);
1698-
zend_uint comply = va_arg(args, zend_uint);
1699-
zend_uint comply_mask = (comply)? mask:0;
1697+
uint32_t mask = va_arg(args, uint32_t);
1698+
uint32_t comply = va_arg(args, uint32_t);
1699+
uint32_t comply_mask = (comply)? mask:0;
17001700

17011701
if ((hash_key->key && hash_key->key->val[0] != 0)
17021702
&& (comply_mask == (ce->ce_flags & mask))) {
@@ -1715,8 +1715,8 @@ static int copy_class_or_interface_name(zval *el TSRMLS_DC, int num_args, va_lis
17151715
Returns an array of all declared traits. */
17161716
ZEND_FUNCTION(get_declared_traits)
17171717
{
1718-
zend_uint mask = ZEND_ACC_TRAIT;
1719-
zend_uint comply = 1;
1718+
uint32_t mask = ZEND_ACC_TRAIT;
1719+
uint32_t comply = 1;
17201720

17211721
if (zend_parse_parameters_none() == FAILURE) {
17221722
return;
@@ -1732,8 +1732,8 @@ ZEND_FUNCTION(get_declared_traits)
17321732
Returns an array of all declared classes. */
17331733
ZEND_FUNCTION(get_declared_classes)
17341734
{
1735-
zend_uint mask = ZEND_ACC_INTERFACE | (ZEND_ACC_TRAIT & ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);
1736-
zend_uint comply = 0;
1735+
uint32_t mask = ZEND_ACC_INTERFACE | (ZEND_ACC_TRAIT & ~ZEND_ACC_EXPLICIT_ABSTRACT_CLASS);
1736+
uint32_t comply = 0;
17371737

17381738
if (zend_parse_parameters_none() == FAILURE) {
17391739
return;
@@ -1748,8 +1748,8 @@ ZEND_FUNCTION(get_declared_classes)
17481748
Returns an array of all declared interfaces. */
17491749
ZEND_FUNCTION(get_declared_interfaces)
17501750
{
1751-
zend_uint mask = ZEND_ACC_INTERFACE;
1752-
zend_uint comply = 1;
1751+
uint32_t mask = ZEND_ACC_INTERFACE;
1752+
uint32_t comply = 1;
17531753

17541754
if (zend_parse_parameters_none() == FAILURE) {
17551755
return;

Zend/zend_closures.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
308308
}
309309

310310
if (arg_info) {
311-
zend_uint i, required = closure->func.common.required_num_args;
311+
uint32_t i, required = closure->func.common.required_num_args;
312312

313313
array_init(&val);
314314

0 commit comments

Comments
 (0)