mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
further normalizations, uint vs uint32_t
fix merge mistake yet one more replacement run
This commit is contained in:
parent
1b7e014d1c
commit
b204b3abd1
63 changed files with 191 additions and 191 deletions
14
Zend/zend.c
14
Zend/zend.c
|
@ -53,7 +53,7 @@ ZEND_API FILE *(*zend_fopen)(const char *filename, zend_string **opened_path);
|
|||
ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle);
|
||||
ZEND_API void (*zend_ticks_function)(int ticks);
|
||||
ZEND_API void (*zend_interrupt_function)(zend_execute_data *execute_data);
|
||||
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
||||
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args);
|
||||
size_t (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
|
||||
zend_string *(*zend_vstrpprintf)(size_t max_len, const char *format, va_list ap);
|
||||
ZEND_API char *(*zend_getenv)(char *name, size_t name_len);
|
||||
|
@ -155,7 +155,7 @@ ZEND_API zend_utility_values zend_uv;
|
|||
|
||||
/* version information */
|
||||
static char *zend_version_info;
|
||||
static uint zend_version_info_length;
|
||||
static uint32_t zend_version_info_length;
|
||||
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2016 Zend Technologies\n"
|
||||
#define PRINT_ZVAL_INDENT 4
|
||||
|
||||
|
@ -903,7 +903,7 @@ void zend_shutdown(void) /* {{{ */
|
|||
void zend_set_utility_values(zend_utility_values *utility_values) /* {{{ */
|
||||
{
|
||||
zend_uv = *utility_values;
|
||||
zend_uv.import_use_extension_length = (uint)strlen(zend_uv.import_use_extension);
|
||||
zend_uv.import_use_extension_length = (uint32_t)strlen(zend_uv.import_use_extension);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -920,7 +920,7 @@ ZEND_COLD void zenderror(const char *error) /* {{{ */
|
|||
/* }}} */
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API ZEND_COLD void _zend_bailout(char *filename, uint lineno) /* {{{ */
|
||||
ZEND_API ZEND_COLD void _zend_bailout(char *filename, uint32_t lineno) /* {{{ */
|
||||
{
|
||||
|
||||
if (!EG(bailout)) {
|
||||
|
@ -939,9 +939,9 @@ END_EXTERN_C()
|
|||
ZEND_API void zend_append_version_info(const zend_extension *extension) /* {{{ */
|
||||
{
|
||||
char *new_info;
|
||||
uint new_info_length;
|
||||
uint32_t new_info_length;
|
||||
|
||||
new_info_length = (uint)(sizeof(" with v, , by \n")
|
||||
new_info_length = (uint32_t)(sizeof(" with v, , by \n")
|
||||
+ strlen(extension->name)
|
||||
+ strlen(extension->version)
|
||||
+ strlen(extension->copyright)
|
||||
|
@ -1073,7 +1073,7 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a
|
|||
zval params[5];
|
||||
zval retval;
|
||||
const char *error_filename;
|
||||
uint error_lineno = 0;
|
||||
uint32_t error_lineno = 0;
|
||||
zval orig_user_error_handler;
|
||||
zend_bool in_compilation;
|
||||
zend_class_entry *saved_class_entry;
|
||||
|
|
|
@ -178,7 +178,7 @@ struct _zend_class_entry {
|
|||
};
|
||||
|
||||
typedef struct _zend_utility_functions {
|
||||
void (*error_function)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0);
|
||||
void (*error_function)(int type, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0);
|
||||
size_t (*printf_function)(const char *format, ...) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 1, 2);
|
||||
size_t (*write_function)(const char *str, size_t str_length);
|
||||
FILE *(*fopen_function)(const char *filename, zend_string **opened_path);
|
||||
|
@ -195,7 +195,7 @@ typedef struct _zend_utility_functions {
|
|||
|
||||
typedef struct _zend_utility_values {
|
||||
char *import_use_extension;
|
||||
uint import_use_extension_length;
|
||||
uint32_t import_use_extension_length;
|
||||
zend_bool html_errors;
|
||||
} zend_utility_values;
|
||||
|
||||
|
@ -226,7 +226,7 @@ void zend_register_standard_ini_entries(void);
|
|||
void zend_post_startup(void);
|
||||
void zend_set_utility_values(zend_utility_values *utility_values);
|
||||
|
||||
ZEND_API ZEND_COLD void _zend_bailout(char *filename, uint lineno);
|
||||
ZEND_API ZEND_COLD void _zend_bailout(char *filename, uint32_t lineno);
|
||||
|
||||
ZEND_API char *get_zend_version(void);
|
||||
ZEND_API int zend_make_printable_zval(zval *expr, zval *expr_copy);
|
||||
|
@ -259,7 +259,7 @@ extern ZEND_API zend_write_func_t zend_write;
|
|||
extern ZEND_API FILE *(*zend_fopen)(const char *filename, zend_string **opened_path);
|
||||
extern ZEND_API void (*zend_ticks_function)(int ticks);
|
||||
extern ZEND_API void (*zend_interrupt_function)(zend_execute_data *execute_data);
|
||||
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0);
|
||||
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0);
|
||||
extern ZEND_API void (*zend_on_timeout)(int seconds);
|
||||
extern ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle);
|
||||
extern size_t (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
|
||||
|
|
|
@ -1562,7 +1562,7 @@ ZEND_API int add_next_index_zval(zval *arg, zval *value) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zval *add_get_assoc_string_ex(zval *arg, const char *key, uint key_len, const char *str) /* {{{ */
|
||||
ZEND_API zval *add_get_assoc_string_ex(zval *arg, const char *key, uint32_t key_len, const char *str) /* {{{ */
|
||||
{
|
||||
zval tmp, *ret;
|
||||
|
||||
|
@ -1572,7 +1572,7 @@ ZEND_API zval *add_get_assoc_string_ex(zval *arg, const char *key, uint key_len,
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zval *add_get_assoc_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, size_t length) /* {{{ */
|
||||
ZEND_API zval *add_get_assoc_stringl_ex(zval *arg, const char *key, uint32_t key_len, const char *str, size_t length) /* {{{ */
|
||||
{
|
||||
zval tmp, *ret;
|
||||
|
||||
|
@ -3178,7 +3178,7 @@ get_function_via_handler:
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error) /* {{{ */
|
||||
ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error) /* {{{ */
|
||||
{
|
||||
zend_bool ret;
|
||||
zend_fcall_info_cache fcc_local;
|
||||
|
@ -3378,7 +3378,7 @@ again:
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, zend_string **callable_name) /* {{{ */
|
||||
ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name) /* {{{ */
|
||||
{
|
||||
return zend_is_callable_ex(callable, NULL, check_flags, callable_name, NULL, NULL);
|
||||
}
|
||||
|
@ -3410,7 +3410,7 @@ ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_nam
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error) /* {{{ */
|
||||
ZEND_API int zend_fcall_info_init(zval *callable, uint32_t check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error) /* {{{ */
|
||||
{
|
||||
if (!zend_is_callable_ex(callable, NULL, check_flags, callable_name, fcc, error)) {
|
||||
return FAILURE;
|
||||
|
|
|
@ -312,8 +312,8 @@ ZEND_API ZEND_COLD void zend_wrong_param_count(void);
|
|||
|
||||
#define IS_CALLABLE_STRICT (IS_CALLABLE_CHECK_IS_STATIC)
|
||||
|
||||
ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error);
|
||||
ZEND_API zend_bool zend_is_callable(zval *callable, uint check_flags, zend_string **callable_name);
|
||||
ZEND_API zend_bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error);
|
||||
ZEND_API zend_bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name);
|
||||
ZEND_API zend_bool zend_make_callable(zval *callable, zend_string **callable_name);
|
||||
ZEND_API const char *zend_get_module_version(const char *module_name);
|
||||
ZEND_API int zend_get_module_started(const char *module_name);
|
||||
|
@ -438,8 +438,8 @@ ZEND_API int add_next_index_string(zval *arg, const char *str);
|
|||
ZEND_API int add_next_index_stringl(zval *arg, const char *str, size_t length);
|
||||
ZEND_API int add_next_index_zval(zval *arg, zval *value);
|
||||
|
||||
ZEND_API zval *add_get_assoc_string_ex(zval *arg, const char *key, uint key_len, const char *str);
|
||||
ZEND_API zval *add_get_assoc_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, size_t length);
|
||||
ZEND_API zval *add_get_assoc_string_ex(zval *arg, const char *key, uint32_t key_len, const char *str);
|
||||
ZEND_API zval *add_get_assoc_stringl_ex(zval *arg, const char *key, uint32_t key_len, const char *str, size_t length);
|
||||
|
||||
#define add_get_assoc_string(__arg, __key, __str) add_get_assoc_string_ex(__arg, __key, strlen(__key), __str)
|
||||
#define add_get_assoc_stringl(__arg, __key, __str, __length) add_get_assoc_stringl_ex(__arg, __key, strlen(__key), __str, __length)
|
||||
|
@ -492,7 +492,7 @@ ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
|
|||
* The callable_name argument may be NULL.
|
||||
* Set check_flags to IS_CALLABLE_STRICT for every new usage!
|
||||
*/
|
||||
ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error);
|
||||
ZEND_API int zend_fcall_info_init(zval *callable, uint32_t check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_string **callable_name, char **error);
|
||||
|
||||
/** Clear arguments connected with zend_fcall_info *fci
|
||||
* If free_mem is not zero then the params array gets free'd as well
|
||||
|
|
|
@ -368,7 +368,7 @@ static ZEND_COLD ZEND_NORETURN void zend_mm_safe_error(zend_mm_heap *heap,
|
|||
size_t limit,
|
||||
#if ZEND_DEBUG
|
||||
const char *filename,
|
||||
uint lineno,
|
||||
uint32_t lineno,
|
||||
#endif
|
||||
size_t size)
|
||||
{
|
||||
|
|
|
@ -50,8 +50,8 @@ typedef struct _zend_leak_info {
|
|||
size_t size;
|
||||
const char *filename;
|
||||
const char *orig_filename;
|
||||
uint lineno;
|
||||
uint orig_lineno;
|
||||
uint32_t lineno;
|
||||
uint32_t orig_lineno;
|
||||
} zend_leak_info;
|
||||
|
||||
#if ZEND_DEBUG
|
||||
|
@ -59,8 +59,8 @@ typedef struct _zend_mm_debug_info {
|
|||
size_t size;
|
||||
const char *filename;
|
||||
const char *orig_filename;
|
||||
uint lineno;
|
||||
uint orig_lineno;
|
||||
uint32_t lineno;
|
||||
uint32_t orig_lineno;
|
||||
} zend_mm_debug_info;
|
||||
|
||||
# define ZEND_MM_OVERHEAD ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info))
|
||||
|
|
|
@ -961,7 +961,7 @@ ZEND_API ZEND_COLD zend_object *zend_throw_error_exception(zend_class_entry *exc
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
static void zend_error_va(int type, const char *file, uint lineno, const char *format, ...) /* {{{ */
|
||||
static void zend_error_va(int type, const char *file, uint32_t lineno, const char *format, ...) /* {{{ */
|
||||
{
|
||||
va_list args;
|
||||
|
||||
|
@ -971,7 +971,7 @@ static void zend_error_va(int type, const char *file, uint lineno, const char *f
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
static void zend_error_helper(int type, const char *filename, const uint lineno, const char *format, ...) /* {{{ */
|
||||
static void zend_error_helper(int type, const char *filename, const uint32_t lineno, const char *format, ...) /* {{{ */
|
||||
{
|
||||
va_list va;
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ ZEND_API const char *get_active_class_name(const char **space);
|
|||
ZEND_API const char *get_active_function_name(void);
|
||||
ZEND_API const char *zend_get_executed_filename(void);
|
||||
ZEND_API zend_string *zend_get_executed_filename_ex(void);
|
||||
ZEND_API uint zend_get_executed_lineno(void);
|
||||
ZEND_API uint32_t zend_get_executed_lineno(void);
|
||||
ZEND_API zend_class_entry *zend_get_executed_scope(void);
|
||||
ZEND_API zend_bool zend_is_executing(void);
|
||||
|
||||
|
|
|
@ -505,7 +505,7 @@ ZEND_API zend_string *zend_get_executed_filename_ex(void) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API uint zend_get_executed_lineno(void) /* {{{ */
|
||||
ZEND_API uint32_t zend_get_executed_lineno(void) /* {{{ */
|
||||
{
|
||||
zend_execute_data *ex = EG(current_execute_data);
|
||||
|
||||
|
@ -1185,7 +1185,7 @@ static void zend_timeout_handler(int dummy) /* {{{ */
|
|||
if (EG(timed_out)) {
|
||||
/* Die on hard timeout */
|
||||
const char *error_filename = NULL;
|
||||
uint error_lineno = 0;
|
||||
uint32_t error_lineno = 0;
|
||||
char log_buffer[2048];
|
||||
int output_len = 0;
|
||||
|
||||
|
|
|
@ -783,7 +783,7 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
|
|||
if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;
|
||||
|
||||
#define ZEND_HASH_REVERSE_FOREACH(_ht, indirect) do { \
|
||||
uint _idx; \
|
||||
uint32_t _idx; \
|
||||
for (_idx = (_ht)->nNumUsed; _idx > 0; _idx--) { \
|
||||
Bucket *_p = (_ht)->arData + _idx - 1; \
|
||||
zval *_z = &_p->val; \
|
||||
|
|
|
@ -400,7 +400,7 @@ ZEND_API int zend_restore_ini_entry(zend_string *name, int stage) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type)) /* {{{ */
|
||||
ZEND_API int zend_ini_register_displayer(char *name, uint32_t name_length, void (*displayer)(zend_ini_entry *ini_entry, int type)) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
|
||||
|
@ -418,7 +418,7 @@ ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*di
|
|||
* Data retrieval
|
||||
*/
|
||||
|
||||
ZEND_API zend_long zend_ini_long(char *name, uint name_length, int orig) /* {{{ */
|
||||
ZEND_API zend_long zend_ini_long(char *name, uint32_t name_length, int orig) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
|
||||
|
@ -435,7 +435,7 @@ ZEND_API zend_long zend_ini_long(char *name, uint name_length, int orig) /* {{{
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API double zend_ini_double(char *name, uint name_length, int orig) /* {{{ */
|
||||
ZEND_API double zend_ini_double(char *name, uint32_t name_length, int orig) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
|
||||
|
@ -452,7 +452,7 @@ ZEND_API double zend_ini_double(char *name, uint name_length, int orig) /* {{{ *
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API char *zend_ini_string_ex(char *name, uint name_length, int orig, zend_bool *exists) /* {{{ */
|
||||
ZEND_API char *zend_ini_string_ex(char *name, uint32_t name_length, int orig, zend_bool *exists) /* {{{ */
|
||||
{
|
||||
zend_ini_entry *ini_entry;
|
||||
|
||||
|
@ -476,7 +476,7 @@ ZEND_API char *zend_ini_string_ex(char *name, uint name_length, int orig, zend_b
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig) /* {{{ */
|
||||
ZEND_API char *zend_ini_string(char *name, uint32_t name_length, int orig) /* {{{ */
|
||||
{
|
||||
zend_bool exists = 1;
|
||||
char *return_value;
|
||||
|
@ -498,7 +498,7 @@ static void zend_ini_displayer_cb(zend_ini_entry *ini_entry, int type) /* {{{ */
|
|||
ini_entry->displayer(ini_entry, type);
|
||||
} else {
|
||||
char *display_string;
|
||||
uint display_string_length;
|
||||
uint32_t display_string_length;
|
||||
|
||||
if (type == ZEND_INI_DISPLAY_ORIG && ini_entry->modified) {
|
||||
if (ini_entry->orig_value) {
|
||||
|
|
|
@ -40,8 +40,8 @@ typedef struct _zend_ini_entry_def {
|
|||
void (*displayer)(zend_ini_entry *ini_entry, int type);
|
||||
int modifiable;
|
||||
|
||||
uint name_length;
|
||||
uint value_length;
|
||||
uint32_t name_length;
|
||||
uint32_t value_length;
|
||||
} zend_ini_entry_def;
|
||||
|
||||
struct _zend_ini_entry {
|
||||
|
@ -81,12 +81,12 @@ ZEND_API int zend_alter_ini_entry_chars_ex(zend_string *name, const char *value,
|
|||
ZEND_API int zend_restore_ini_entry(zend_string *name, int stage);
|
||||
ZEND_API void display_ini_entries(zend_module_entry *module);
|
||||
|
||||
ZEND_API zend_long zend_ini_long(char *name, uint name_length, int orig);
|
||||
ZEND_API double zend_ini_double(char *name, uint name_length, int orig);
|
||||
ZEND_API char *zend_ini_string(char *name, uint name_length, int orig);
|
||||
ZEND_API char *zend_ini_string_ex(char *name, uint name_length, int orig, zend_bool *exists);
|
||||
ZEND_API zend_long zend_ini_long(char *name, uint32_t name_length, int orig);
|
||||
ZEND_API double zend_ini_double(char *name, uint32_t name_length, int orig);
|
||||
ZEND_API char *zend_ini_string(char *name, uint32_t name_length, int orig);
|
||||
ZEND_API char *zend_ini_string_ex(char *name, uint32_t name_length, int orig, zend_bool *exists);
|
||||
|
||||
ZEND_API int zend_ini_register_displayer(char *name, uint name_length, void (*displayer)(zend_ini_entry *ini_entry, int type));
|
||||
ZEND_API int zend_ini_register_displayer(char *name, uint32_t name_length, void (*displayer)(zend_ini_entry *ini_entry, int type));
|
||||
|
||||
ZEND_API ZEND_INI_DISP(zend_ini_boolean_displayer_cb);
|
||||
ZEND_API ZEND_INI_DISP(zend_ini_color_displayer_cb);
|
||||
|
|
|
@ -34,7 +34,7 @@ typedef struct _zend_lex_state {
|
|||
zend_ptr_stack heredoc_label_stack;
|
||||
|
||||
zend_file_handle *in;
|
||||
uint lineno;
|
||||
uint32_t lineno;
|
||||
zend_string *filename;
|
||||
|
||||
/* original (unfiltered) script */
|
||||
|
|
|
@ -367,9 +367,9 @@ char *alloca();
|
|||
#endif
|
||||
|
||||
#if ZEND_DEBUG
|
||||
# define ZEND_FILE_LINE_D const char *__zend_filename, const uint __zend_lineno
|
||||
# define ZEND_FILE_LINE_D const char *__zend_filename, const uint32_t __zend_lineno
|
||||
# define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D
|
||||
# define ZEND_FILE_LINE_ORIG_D const char *__zend_orig_filename, const uint __zend_orig_lineno
|
||||
# define ZEND_FILE_LINE_ORIG_D const char *__zend_orig_filename, const uint32_t __zend_orig_lineno
|
||||
# define ZEND_FILE_LINE_ORIG_DC , ZEND_FILE_LINE_ORIG_D
|
||||
# define ZEND_FILE_LINE_RELAY_C __zend_filename, __zend_lineno
|
||||
# define ZEND_FILE_LINE_RELAY_CC , ZEND_FILE_LINE_RELAY_C
|
||||
|
|
|
@ -130,8 +130,8 @@ static zend_string *zend_new_interned_string_int(zend_string *str)
|
|||
{
|
||||
#ifndef ZTS
|
||||
zend_ulong h;
|
||||
uint nIndex;
|
||||
uint idx;
|
||||
uint32_t nIndex;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
|
||||
if (ZSTR_IS_INTERNED(str)) {
|
||||
|
@ -197,7 +197,7 @@ static zend_string *zend_new_interned_string_int(zend_string *str)
|
|||
static void zend_interned_strings_snapshot_int(void)
|
||||
{
|
||||
#ifndef ZTS
|
||||
uint idx;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
|
||||
idx = CG(interned_strings).nNumUsed;
|
||||
|
@ -213,8 +213,8 @@ static void zend_interned_strings_snapshot_int(void)
|
|||
static void zend_interned_strings_restore_int(void)
|
||||
{
|
||||
#ifndef ZTS
|
||||
uint nIndex;
|
||||
uint idx;
|
||||
uint32_t nIndex;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
|
||||
idx = CG(interned_strings).nNumUsed;
|
||||
|
|
|
@ -59,7 +59,7 @@ static void end_write(TsHashTable *ht)
|
|||
}
|
||||
|
||||
/* delegates */
|
||||
ZEND_API void _zend_ts_hash_init(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
|
||||
ZEND_API void _zend_ts_hash_init(TsHashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
|
||||
{
|
||||
#ifdef ZTS
|
||||
ht->mx_reader = tsrm_mutex_alloc();
|
||||
|
@ -69,7 +69,7 @@ ZEND_API void _zend_ts_hash_init(TsHashTable *ht, uint nSize, dtor_func_t pDestr
|
|||
_zend_hash_init(TS_HASH(ht), nSize, pDestructor, persistent ZEND_FILE_LINE_RELAY_CC);
|
||||
}
|
||||
|
||||
ZEND_API void _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
|
||||
ZEND_API void _zend_ts_hash_init_ex(TsHashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
|
||||
{
|
||||
#ifdef ZTS
|
||||
ht->mx_reader = tsrm_mutex_alloc();
|
||||
|
|
|
@ -37,8 +37,8 @@ BEGIN_EXTERN_C()
|
|||
#define TS_HASH(table) (&(table->hash))
|
||||
|
||||
/* startup/shutdown */
|
||||
ZEND_API void _zend_ts_hash_init(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC);
|
||||
ZEND_API void _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC);
|
||||
ZEND_API void _zend_ts_hash_init(TsHashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC);
|
||||
ZEND_API void _zend_ts_hash_init_ex(TsHashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC);
|
||||
ZEND_API void zend_ts_hash_destroy(TsHashTable *ht);
|
||||
ZEND_API void zend_ts_hash_clean(TsHashTable *ht);
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ PHP_COM_DOTNET_API OLECHAR *php_com_string_to_olestring(char *string, size_t str
|
|||
PHP_COM_DOTNET_API char *php_com_olestring_to_string(OLECHAR *olestring, size_t *string_len, int codepage)
|
||||
{
|
||||
char *string;
|
||||
uint length = 0;
|
||||
uint32_t length = 0;
|
||||
BOOL ok;
|
||||
|
||||
length = WideCharToMultiByte(codepage, 0, olestring, -1, NULL, 0, NULL, NULL);
|
||||
|
|
|
@ -424,7 +424,7 @@ static int php_iconv_output_handler(void **nothing, php_output_context *output_c
|
|||
} else {
|
||||
len = spprintf(&content_type, 0, "Content-Type:%.*s; charset=%s", mimetype_len ? mimetype_len : (int) strlen(mimetype), mimetype, get_output_encoding());
|
||||
}
|
||||
if (content_type && SUCCESS == sapi_add_header(content_type, (uint)len, 0)) {
|
||||
if (content_type && SUCCESS == sapi_add_header(content_type, (uint32_t)len, 0)) {
|
||||
SG(sapi_headers).send_default_content_type = 0;
|
||||
php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE, NULL);
|
||||
}
|
||||
|
|
|
@ -1643,9 +1643,9 @@ PHP_FUNCTION(ldap_delete)
|
|||
|
||||
/* {{{ _ldap_str_equal_to_const
|
||||
*/
|
||||
static int _ldap_str_equal_to_const(const char *str, uint str_len, const char *cstr)
|
||||
static int _ldap_str_equal_to_const(const char *str, uint32_t str_len, const char *cstr)
|
||||
{
|
||||
uint i;
|
||||
uint32_t i;
|
||||
|
||||
if (strlen(cstr) != str_len)
|
||||
return 0;
|
||||
|
@ -1662,9 +1662,9 @@ static int _ldap_str_equal_to_const(const char *str, uint str_len, const char *c
|
|||
|
||||
/* {{{ _ldap_strlen_max
|
||||
*/
|
||||
static int _ldap_strlen_max(const char *str, uint max_len)
|
||||
static int _ldap_strlen_max(const char *str, uint32_t max_len)
|
||||
{
|
||||
uint i;
|
||||
uint32_t i;
|
||||
|
||||
for (i = 0; i < max_len; ++i) {
|
||||
if (str[i] == '\0') {
|
||||
|
@ -1697,7 +1697,7 @@ PHP_FUNCTION(ldap_modify_batch)
|
|||
int i, j, k;
|
||||
int num_mods, num_modprops, num_modvals;
|
||||
LDAPMod **ldap_mods;
|
||||
uint oper;
|
||||
uint32_t oper;
|
||||
|
||||
/*
|
||||
$mods = array(
|
||||
|
|
|
@ -1332,7 +1332,7 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output)
|
|||
/* }}} */
|
||||
|
||||
/* {{{ static _php_mb_ini_mbstring_internal_encoding_set */
|
||||
int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_value_length)
|
||||
int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint32_t new_value_length)
|
||||
{
|
||||
const mbfl_encoding *encoding;
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ MBSTRING_API int php_mb_stripos(int mode, const char *old_haystack, unsigned int
|
|||
MBSTRING_API int php_mb_check_encoding(const char *input, size_t length, const char *enc);
|
||||
|
||||
/* internal use only */
|
||||
int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_value_length);
|
||||
int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint32_t new_value_length);
|
||||
|
||||
ZEND_BEGIN_MODULE_GLOBALS(mbstring)
|
||||
char *internal_encoding_name;
|
||||
|
|
|
@ -596,7 +596,7 @@ PHP_FUNCTION(mysqli_stmt_bind_result)
|
|||
|
||||
MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID);
|
||||
|
||||
if ((uint)argc != mysql_stmt_field_count(stmt->stmt)) {
|
||||
if ((uint32_t)argc != mysql_stmt_field_count(stmt->stmt)) {
|
||||
php_error_docref(NULL, E_WARNING, "Number of bind variables doesn't match number of fields in prepared statement");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
@ -1330,7 +1330,7 @@ PHP_FUNCTION(mysqli_field_seek)
|
|||
}
|
||||
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
|
||||
|
||||
if (fieldnr < 0 || (uint)fieldnr >= mysql_num_fields(result)) {
|
||||
if (fieldnr < 0 || (uint32_t)fieldnr >= mysql_num_fields(result)) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid field offset");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
@ -2538,7 +2538,7 @@ PHP_FUNCTION(mysqli_stmt_store_result)
|
|||
#if MYSQL_VERSION_ID >= 50107
|
||||
my_bool tmp=1;
|
||||
#else
|
||||
uint tmp=1;
|
||||
uint32_t tmp=1;
|
||||
#endif
|
||||
mysql_stmt_attr_set(stmt->stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &tmp);
|
||||
break;
|
||||
|
|
|
@ -292,7 +292,7 @@ static zval *result_lengths_read(mysqli_object *obj, zval *retval)
|
|||
#else
|
||||
const zend_ulong *ret;
|
||||
#endif
|
||||
uint field_count;
|
||||
uint32_t field_count;
|
||||
|
||||
CHECK_STATUS(MYSQLI_STATUS_VALID);
|
||||
p = (MYSQL_RES *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;
|
||||
|
|
|
@ -410,7 +410,7 @@ static unsigned int check_mb_utf16(const char *start, const char *end)
|
|||
}
|
||||
|
||||
|
||||
static uint mysqlnd_mbcharlen_utf16(unsigned int utf16)
|
||||
static uint32_t mysqlnd_mbcharlen_utf16(unsigned int utf16)
|
||||
{
|
||||
return UTF16_HIGH_HEAD(utf16) ? 4 : 2;
|
||||
}
|
||||
|
|
|
@ -249,7 +249,7 @@ MYSQLND_METHOD(mysqlnd_debug, func_enter)(MYSQLND_DEBUG * self,
|
|||
if ((self->flags & MYSQLND_DEBUG_DUMP_TRACE) == 0 || self->file_name == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
if ((uint) zend_stack_count(&self->call_stack) >= self->nest_level_limit) {
|
||||
if ((uint32_t) zend_stack_count(&self->call_stack) >= self->nest_level_limit) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -320,7 +320,7 @@ MYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int lin
|
|||
if ((self->flags & MYSQLND_DEBUG_DUMP_TRACE) == 0 || self->file_name == NULL) {
|
||||
return PASS;
|
||||
}
|
||||
if ((uint) zend_stack_count(&self->call_stack) >= self->nest_level_limit) {
|
||||
if ((uint32_t) zend_stack_count(&self->call_stack) >= self->nest_level_limit) {
|
||||
return PASS;
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ MYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int lin
|
|||
struct st_mysqlnd_dbg_function_profile f_profile_stack = {0};
|
||||
struct st_mysqlnd_dbg_function_profile * f_profile = NULL;
|
||||
uint64_t own_time = call_time - mine_non_own_time;
|
||||
uint func_name_len = strlen(*func_name);
|
||||
uint32_t func_name_len = strlen(*func_name);
|
||||
|
||||
self->m->log_va(self, line, file, zend_stack_count(&self->call_stack) - 1, NULL, "<%s (total=%u own=%u in_calls=%u)",
|
||||
*func_name, (unsigned int) call_time, (unsigned int) own_time, (unsigned int) mine_non_own_time
|
||||
|
@ -401,7 +401,7 @@ MYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int lin
|
|||
f_profile->calls = 1;
|
||||
zend_hash_str_add_mem(&self->function_profiles, *func_name, func_name_len, f_profile, sizeof(struct st_mysqlnd_dbg_function_profile));
|
||||
}
|
||||
if ((uint) zend_stack_count(&self->call_time_stack)) {
|
||||
if ((uint32_t) zend_stack_count(&self->call_time_stack)) {
|
||||
uint64_t parent_non_own_time = 0;
|
||||
|
||||
parent_non_own_time_ptr = zend_stack_top(&self->call_time_stack);
|
||||
|
|
|
@ -1400,7 +1400,7 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND_CONN_DATA * const c
|
|||
}
|
||||
DBG_INF_FMT("ret=%s row_count=%u warnings=%u server_status=%u",
|
||||
ret == PASS? "PASS":"FAIL",
|
||||
(uint) set->row_count,
|
||||
(uint32_t) set->row_count,
|
||||
UPSERT_STATUS_GET_WARNINGS(conn->upsert_status),
|
||||
UPSERT_STATUS_GET_SERVER_STATUS(conn->upsert_status));
|
||||
end:
|
||||
|
|
|
@ -363,8 +363,8 @@ static void accel_interned_strings_restore_for_php(void)
|
|||
#ifndef ZTS
|
||||
static void accel_interned_strings_restore_state(void)
|
||||
{
|
||||
uint idx = ZCSG(interned_strings).nNumUsed;
|
||||
uint nIndex;
|
||||
uint32_t idx = ZCSG(interned_strings).nNumUsed;
|
||||
uint32_t nIndex;
|
||||
Bucket *p;
|
||||
|
||||
memset(ZCSG(interned_strings_saved_top),
|
||||
|
@ -401,8 +401,8 @@ static zend_string *accel_find_interned_string(zend_string *str)
|
|||
{
|
||||
/* for now interned strings are supported only for non-ZTS build */
|
||||
zend_ulong h;
|
||||
uint nIndex;
|
||||
uint idx;
|
||||
uint32_t nIndex;
|
||||
uint32_t idx;
|
||||
Bucket *arData, *p;
|
||||
|
||||
if (IS_ACCEL_INTERNED(str)) {
|
||||
|
@ -441,8 +441,8 @@ zend_string *accel_new_interned_string(zend_string *str)
|
|||
/* for now interned strings are supported only for non-ZTS build */
|
||||
#ifndef ZTS
|
||||
zend_ulong h;
|
||||
uint nIndex;
|
||||
uint idx;
|
||||
uint32_t nIndex;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
|
||||
#ifdef HAVE_OPCACHE_FILE_CACHE
|
||||
|
@ -512,7 +512,7 @@ zend_string *accel_new_interned_string(zend_string *str)
|
|||
/* Copy PHP interned strings from PHP process memory into the shared memory */
|
||||
static void accel_use_shm_interned_strings(void)
|
||||
{
|
||||
uint idx, j;
|
||||
uint32_t idx, j;
|
||||
Bucket *p, *q;
|
||||
|
||||
/* empty string */
|
||||
|
@ -1203,7 +1203,7 @@ static void zend_accel_add_key(char *key, unsigned int key_length, zend_accel_ha
|
|||
#ifdef HAVE_OPCACHE_FILE_CACHE
|
||||
static zend_persistent_script *cache_script_in_file_cache(zend_persistent_script *new_persistent_script, int *from_shared_memory)
|
||||
{
|
||||
uint memory_used;
|
||||
uint32_t memory_used;
|
||||
|
||||
/* Check if script may be stored in shared memory */
|
||||
if (!zend_accel_script_persistable(new_persistent_script)) {
|
||||
|
@ -1261,7 +1261,7 @@ static zend_persistent_script *cache_script_in_file_cache(zend_persistent_script
|
|||
static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_script *new_persistent_script, char *key, unsigned int key_length, int *from_shared_memory)
|
||||
{
|
||||
zend_accel_hash_entry *bucket;
|
||||
uint memory_used;
|
||||
uint32_t memory_used;
|
||||
|
||||
/* Check if script may be stored in shared memory */
|
||||
if (!zend_accel_script_persistable(new_persistent_script)) {
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
#include "zend_shared_alloc.h"
|
||||
|
||||
/* Generated on an Octa-ALPHA 300MHz CPU & 2.5GB RAM monster */
|
||||
static uint prime_numbers[] =
|
||||
static uint32_t prime_numbers[] =
|
||||
{5, 11, 19, 53, 107, 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 };
|
||||
static uint num_prime_numbers = sizeof(prime_numbers) / sizeof(uint);
|
||||
static uint32_t num_prime_numbers = sizeof(prime_numbers) / sizeof(uint32_t);
|
||||
|
||||
void zend_accel_hash_clean(zend_accel_hash *accel_hash)
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ void zend_accel_hash_clean(zend_accel_hash *accel_hash)
|
|||
|
||||
void zend_accel_hash_init(zend_accel_hash *accel_hash, uint32_t hash_size)
|
||||
{
|
||||
uint i;
|
||||
uint32_t i;
|
||||
|
||||
for (i=0; i<num_prime_numbers; i++) {
|
||||
if (hash_size <= prime_numbers[i]) {
|
||||
|
|
|
@ -543,7 +543,7 @@ int start_accel_module(void)
|
|||
Get the scripts which are accelerated by ZendAccelerator */
|
||||
static int accelerator_get_scripts(zval *return_value)
|
||||
{
|
||||
uint i;
|
||||
uint32_t i;
|
||||
zval persistent_script_report;
|
||||
zend_accel_hash_entry *cache_entry;
|
||||
struct tm *ta;
|
||||
|
|
|
@ -735,7 +735,7 @@ zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script,
|
|||
#define ADLER32_DO8(buf, i) ADLER32_DO4(buf, i); ADLER32_DO4(buf, i + 4);
|
||||
#define ADLER32_DO16(buf) ADLER32_DO8(buf, 0); ADLER32_DO8(buf, 8);
|
||||
|
||||
unsigned int zend_adler32(unsigned int checksum, signed char *buf, uint len)
|
||||
unsigned int zend_adler32(unsigned int checksum, signed char *buf, uint32_t len)
|
||||
{
|
||||
unsigned int s1 = checksum & 0xffff;
|
||||
unsigned int s2 = (checksum >> 16) & 0xffff;
|
||||
|
|
|
@ -37,7 +37,7 @@ zend_op_array* zend_accel_load_script(zend_persistent_script *persistent_script,
|
|||
|
||||
#define ADLER32_INIT 1 /* initial Adler-32 value */
|
||||
|
||||
unsigned int zend_adler32(unsigned int checksum, signed char *buf, uint len);
|
||||
unsigned int zend_adler32(unsigned int checksum, signed char *buf, uint32_t len);
|
||||
|
||||
unsigned int zend_accel_script_checksum(zend_persistent_script *persistent_script);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#define ZEND_PERSIST_H
|
||||
|
||||
int zend_accel_script_persistable(zend_persistent_script *script);
|
||||
uint zend_accel_script_persist_calc(zend_persistent_script *script, char *key, unsigned int key_length);
|
||||
uint32_t zend_accel_script_persist_calc(zend_persistent_script *script, char *key, unsigned int key_length);
|
||||
zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script, char **key, unsigned int key_length);
|
||||
|
||||
#endif /* ZEND_PERSIST_H */
|
||||
|
|
|
@ -53,7 +53,7 @@ static void zend_persist_zval_calc(zval *z);
|
|||
|
||||
static void zend_hash_persist_calc(HashTable *ht, void (*pPersistElement)(zval *pElement))
|
||||
{
|
||||
uint idx;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
|
||||
if (!(ht->u.flags & HASH_FLAG_INITIALIZED) || ht->nNumUsed == 0) {
|
||||
|
@ -121,7 +121,7 @@ static void zend_persist_ast_calc(zend_ast *ast)
|
|||
static void zend_persist_zval_calc(zval *z)
|
||||
{
|
||||
zend_uchar flags;
|
||||
uint size;
|
||||
uint32_t size;
|
||||
|
||||
switch (Z_TYPE_P(z)) {
|
||||
case IS_STRING:
|
||||
|
@ -396,7 +396,7 @@ static void zend_accel_persist_class_table_calc(HashTable *class_table)
|
|||
zend_hash_persist_calc(class_table, zend_persist_class_entry_calc);
|
||||
}
|
||||
|
||||
uint zend_accel_script_persist_calc(zend_persistent_script *new_persistent_script, char *key, unsigned int key_length)
|
||||
uint32_t zend_accel_script_persist_calc(zend_persistent_script *new_persistent_script, char *key, unsigned int key_length)
|
||||
{
|
||||
new_persistent_script->mem = NULL;
|
||||
new_persistent_script->size = 0;
|
||||
|
|
|
@ -7046,7 +7046,7 @@ PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, l
|
|||
char *field_name;
|
||||
size_t num_fields;
|
||||
int pg_numrows, pg_row;
|
||||
uint i;
|
||||
uint32_t i;
|
||||
assert(Z_TYPE_P(ret_array) == IS_ARRAY);
|
||||
|
||||
if ((pg_numrows = PQntuples(pg_result)) <= 0) {
|
||||
|
|
|
@ -140,7 +140,7 @@ static int phar_dir_flush(php_stream *stream) /* {{{ */
|
|||
* This is used to get a unique listing of virtual directories within a phar,
|
||||
* for iterating over opendir()ed phar directories.
|
||||
*/
|
||||
static int phar_add_empty(HashTable *ht, char *arKey, uint nKeyLength) /* {{{ */
|
||||
static int phar_add_empty(HashTable *ht, char *arKey, uint32_t nKeyLength) /* {{{ */
|
||||
{
|
||||
zval dummy;
|
||||
|
||||
|
@ -183,7 +183,7 @@ static php_stream *phar_make_dirstream(char *dir, HashTable *manifest) /* {{{ */
|
|||
size_t dirlen = strlen(dir);
|
||||
char *entry, *found, *save;
|
||||
zend_string *str_key;
|
||||
uint keylen;
|
||||
uint32_t keylen;
|
||||
zend_ulong unused;
|
||||
|
||||
ALLOC_HASHTABLE(data);
|
||||
|
@ -204,8 +204,8 @@ static php_stream *phar_make_dirstream(char *dir, HashTable *manifest) /* {{{ */
|
|||
}
|
||||
|
||||
keylen = ZSTR_LEN(str_key);
|
||||
if (keylen <= (uint)dirlen) {
|
||||
if (keylen == 0 || keylen < (uint)dirlen || !strncmp(ZSTR_VAL(str_key), dir, dirlen)) {
|
||||
if (keylen <= (uint32_t)dirlen) {
|
||||
if (keylen == 0 || keylen < (uint32_t)dirlen || !strncmp(ZSTR_VAL(str_key), dir, dirlen)) {
|
||||
if (SUCCESS != zend_hash_move_forward(manifest)) {
|
||||
break;
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ php_stream *phar_wrapper_open_dir(php_stream_wrapper *wrapper, const char *path,
|
|||
zend_ulong unused;
|
||||
phar_archive_data *phar;
|
||||
phar_entry_info *entry = NULL;
|
||||
uint host_len;
|
||||
uint32_t host_len;
|
||||
|
||||
if ((resource = phar_parse_url(wrapper, path, mode, options)) == NULL) {
|
||||
php_stream_wrapper_log_error(wrapper, options, "phar url \"%s\" is unknown", path);
|
||||
|
@ -385,7 +385,7 @@ php_stream *phar_wrapper_open_dir(php_stream_wrapper *wrapper, const char *path,
|
|||
while (FAILURE != zend_hash_has_more_elements(&phar->manifest)) {
|
||||
if (HASH_KEY_NON_EXISTENT !=
|
||||
zend_hash_get_current_key(&phar->manifest, &str_key, &unused)) {
|
||||
if (ZSTR_LEN(str_key) > (uint)i_len && 0 == memcmp(ZSTR_VAL(str_key), internal_file, i_len)) {
|
||||
if (ZSTR_LEN(str_key) > (uint32_t)i_len && 0 == memcmp(ZSTR_VAL(str_key), internal_file, i_len)) {
|
||||
/* directory found */
|
||||
internal_file = estrndup(internal_file,
|
||||
i_len);
|
||||
|
@ -415,7 +415,7 @@ int phar_wrapper_mkdir(php_stream_wrapper *wrapper, const char *url_from, int mo
|
|||
char *error, *arch, *entry2;
|
||||
int arch_len, entry_len;
|
||||
php_url *resource = NULL;
|
||||
uint host_len;
|
||||
uint32_t host_len;
|
||||
|
||||
/* pre-readonly check, we need to know if this is a data phar */
|
||||
if (FAILURE == phar_split_fname(url_from, strlen(url_from), &arch, &arch_len, &entry2, &entry_len, 2, 2)) {
|
||||
|
@ -547,10 +547,10 @@ int phar_wrapper_rmdir(php_stream_wrapper *wrapper, const char *url, int options
|
|||
char *error, *arch, *entry2;
|
||||
int arch_len, entry_len;
|
||||
php_url *resource = NULL;
|
||||
uint host_len;
|
||||
uint32_t host_len;
|
||||
zend_string *str_key;
|
||||
zend_ulong unused;
|
||||
uint path_len;
|
||||
uint32_t path_len;
|
||||
|
||||
/* pre-readonly check, we need to know if this is a data phar */
|
||||
if (FAILURE == phar_split_fname(url, strlen(url), &arch, &arch_len, &entry2, &entry_len, 2, 2)) {
|
||||
|
|
|
@ -103,7 +103,7 @@ static void phar_split_cache_list(void) /* {{{ */
|
|||
char *key, *lasts, *end;
|
||||
char ds[2];
|
||||
phar_archive_data *phar;
|
||||
uint i = 0;
|
||||
uint32_t i = 0;
|
||||
|
||||
if (!PHAR_G(cache_list) || !(PHAR_G(cache_list)[0])) {
|
||||
return;
|
||||
|
@ -1955,11 +1955,11 @@ woohoo:
|
|||
HASH_KEY_NON_EXISTENT != zend_hash_get_current_key(&(PHAR_G(phar_fname_map)), &str_key, &unused);
|
||||
zend_hash_move_forward(&(PHAR_G(phar_fname_map)))
|
||||
) {
|
||||
if (ZSTR_LEN(str_key) > (uint) filename_len) {
|
||||
if (ZSTR_LEN(str_key) > (uint32_t) filename_len) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!memcmp(filename, ZSTR_VAL(str_key), ZSTR_LEN(str_key)) && ((uint)filename_len == ZSTR_LEN(str_key)
|
||||
if (!memcmp(filename, ZSTR_VAL(str_key), ZSTR_LEN(str_key)) && ((uint32_t)filename_len == ZSTR_LEN(str_key)
|
||||
|| filename[ZSTR_LEN(str_key)] == '/' || filename[ZSTR_LEN(str_key)] == '\0')) {
|
||||
if (NULL == (pphar = zend_hash_get_current_data_ptr(&(PHAR_G(phar_fname_map))))) {
|
||||
break;
|
||||
|
@ -1974,11 +1974,11 @@ woohoo:
|
|||
HASH_KEY_NON_EXISTENT != zend_hash_get_current_key(&cached_phars, &str_key, &unused);
|
||||
zend_hash_move_forward(&cached_phars)
|
||||
) {
|
||||
if (ZSTR_LEN(str_key) > (uint) filename_len) {
|
||||
if (ZSTR_LEN(str_key) > (uint32_t) filename_len) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!memcmp(filename, ZSTR_VAL(str_key), ZSTR_LEN(str_key)) && ((uint)filename_len == ZSTR_LEN(str_key)
|
||||
if (!memcmp(filename, ZSTR_VAL(str_key), ZSTR_LEN(str_key)) && ((uint32_t)filename_len == ZSTR_LEN(str_key)
|
||||
|| filename[ZSTR_LEN(str_key)] == '/' || filename[ZSTR_LEN(str_key)] == '\0')) {
|
||||
if (NULL == (pphar = zend_hash_get_current_data_ptr(&cached_phars))) {
|
||||
break;
|
||||
|
|
|
@ -250,7 +250,7 @@ typedef struct _phar_entry_info {
|
|||
char *link; /* symbolic link to another file */
|
||||
char tar_type;
|
||||
/* position in the manifest */
|
||||
uint manifest_pos;
|
||||
uint32_t manifest_pos;
|
||||
/* for stat */
|
||||
unsigned short inode;
|
||||
|
||||
|
@ -300,7 +300,7 @@ struct _phar_archive_data {
|
|||
char *signature;
|
||||
zval metadata;
|
||||
int metadata_len; /* only used for cached manifests */
|
||||
uint phar_pos;
|
||||
uint32_t phar_pos;
|
||||
/* if 1, then this alias was manually specified by the user and is not a permanent alias */
|
||||
unsigned int is_temporary_alias:1;
|
||||
unsigned int is_modified:1;
|
||||
|
|
|
@ -1411,7 +1411,7 @@ struct _phar_t {
|
|||
char *b;
|
||||
zval *ret;
|
||||
php_stream *fp;
|
||||
uint l;
|
||||
uint32_t l;
|
||||
int count;
|
||||
};
|
||||
|
||||
|
@ -1420,7 +1420,7 @@ static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */
|
|||
zval *value;
|
||||
zend_bool close_fp = 1;
|
||||
struct _phar_t *p_obj = (struct _phar_t*) puser;
|
||||
uint base_len = p_obj->l, str_key_len;
|
||||
uint32_t str_key_len, base_len = p_obj->l;
|
||||
phar_entry_data *data;
|
||||
php_stream *fp;
|
||||
php_stat_len fname_len;
|
||||
|
@ -1820,7 +1820,7 @@ PHP_METHOD(Phar, buildFromDirectory)
|
|||
pass.c = apply_reg ? Z_OBJCE(regexiter) : Z_OBJCE(iteriter);
|
||||
pass.p = phar_obj;
|
||||
pass.b = dir;
|
||||
pass.l = (uint)dir_len;
|
||||
pass.l = (uint32_t)dir_len;
|
||||
pass.count = 0;
|
||||
pass.ret = return_value;
|
||||
pass.fp = php_stream_fopen_tmpfile();
|
||||
|
@ -1908,7 +1908,7 @@ PHP_METHOD(Phar, buildFromIterator)
|
|||
pass.c = Z_OBJCE_P(obj);
|
||||
pass.p = phar_obj;
|
||||
pass.b = base;
|
||||
pass.l = (uint)base_len;
|
||||
pass.l = (uint32_t)base_len;
|
||||
pass.ret = return_value;
|
||||
pass.count = 0;
|
||||
pass.fp = php_stream_fopen_tmpfile();
|
||||
|
@ -2623,8 +2623,8 @@ PHP_METHOD(Phar, delete)
|
|||
zend_throw_exception_ex(phar_ce_PharException, 0, "phar \"%s\" is persistent, unable to copy on write", phar_obj->archive->fname);
|
||||
return;
|
||||
}
|
||||
if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint) fname_len)) {
|
||||
if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint) fname_len))) {
|
||||
if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) {
|
||||
if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) {
|
||||
if (entry->is_deleted) {
|
||||
/* entry is deleted, but has not been flushed to disk yet */
|
||||
RETURN_TRUE;
|
||||
|
@ -3463,14 +3463,14 @@ PHP_METHOD(Phar, copy)
|
|||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!zend_hash_str_exists(&phar_obj->archive->manifest, oldfile, (uint) oldfile_len) || NULL == (oldentry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, oldfile, (uint) oldfile_len)) || oldentry->is_deleted) {
|
||||
if (!zend_hash_str_exists(&phar_obj->archive->manifest, oldfile, (uint32_t) oldfile_len) || NULL == (oldentry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, oldfile, (uint32_t) oldfile_len)) || oldentry->is_deleted) {
|
||||
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0,
|
||||
"file \"%s\" cannot be copied to file \"%s\", file does not exist in %s", oldfile, newfile, phar_obj->archive->fname);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (zend_hash_str_exists(&phar_obj->archive->manifest, newfile, (uint) newfile_len)) {
|
||||
if (NULL != (temp = zend_hash_str_find_ptr(&phar_obj->archive->manifest, newfile, (uint) newfile_len)) || !temp->is_deleted) {
|
||||
if (zend_hash_str_exists(&phar_obj->archive->manifest, newfile, (uint32_t) newfile_len)) {
|
||||
if (NULL != (temp = zend_hash_str_find_ptr(&phar_obj->archive->manifest, newfile, (uint32_t) newfile_len)) || !temp->is_deleted) {
|
||||
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0,
|
||||
"file \"%s\" cannot be copied to file \"%s\", file must not already exist in phar %s", oldfile, newfile, phar_obj->archive->fname);
|
||||
RETURN_FALSE;
|
||||
|
@ -3491,7 +3491,7 @@ PHP_METHOD(Phar, copy)
|
|||
return;
|
||||
}
|
||||
/* re-populate with copied-on-write entry */
|
||||
oldentry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, oldfile, (uint) oldfile_len);
|
||||
oldentry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, oldfile, (uint32_t) oldfile_len);
|
||||
}
|
||||
|
||||
memcpy((void *) &newentry, oldentry, sizeof(phar_entry_info));
|
||||
|
@ -3546,8 +3546,8 @@ PHP_METHOD(Phar, offsetExists)
|
|||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint) fname_len)) {
|
||||
if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint) fname_len))) {
|
||||
if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) {
|
||||
if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) {
|
||||
if (entry->is_deleted) {
|
||||
/* entry is deleted, but has not been flushed to disk yet */
|
||||
RETURN_FALSE;
|
||||
|
@ -3560,7 +3560,7 @@ PHP_METHOD(Phar, offsetExists)
|
|||
}
|
||||
RETURN_TRUE;
|
||||
} else {
|
||||
if (zend_hash_str_exists(&phar_obj->archive->virtual_dirs, fname, (uint) fname_len)) {
|
||||
if (zend_hash_str_exists(&phar_obj->archive->virtual_dirs, fname, (uint32_t) fname_len)) {
|
||||
RETURN_TRUE;
|
||||
}
|
||||
RETURN_FALSE;
|
||||
|
@ -3779,8 +3779,8 @@ PHP_METHOD(Phar, offsetUnset)
|
|||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint) fname_len)) {
|
||||
if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint) fname_len))) {
|
||||
if (zend_hash_str_exists(&phar_obj->archive->manifest, fname, (uint32_t) fname_len)) {
|
||||
if (NULL != (entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len))) {
|
||||
if (entry->is_deleted) {
|
||||
/* entry is deleted, but has not been flushed to disk yet */
|
||||
return;
|
||||
|
@ -3792,7 +3792,7 @@ PHP_METHOD(Phar, offsetUnset)
|
|||
return;
|
||||
}
|
||||
/* re-populate entry after copy on write */
|
||||
entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint) fname_len);
|
||||
entry = zend_hash_str_find_ptr(&phar_obj->archive->manifest, fname, (uint32_t) fname_len);
|
||||
}
|
||||
entry->is_modified = 0;
|
||||
entry->is_deleted = 1;
|
||||
|
|
|
@ -166,7 +166,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, const cha
|
|||
php_url *resource = NULL;
|
||||
php_stream *fpf;
|
||||
zval *pzoption, *metadata;
|
||||
uint host_len;
|
||||
uint32_t host_len;
|
||||
|
||||
if ((resource = phar_parse_url(wrapper, path, mode, options)) == NULL) {
|
||||
return NULL;
|
||||
|
@ -556,7 +556,7 @@ static int phar_wrapper_stat(php_stream_wrapper *wrapper, const char *url, int f
|
|||
char *internal_file, *error;
|
||||
phar_archive_data *phar;
|
||||
phar_entry_info *entry;
|
||||
uint host_len;
|
||||
uint32_t host_len;
|
||||
int internal_file_len;
|
||||
|
||||
if ((resource = phar_parse_url(wrapper, url, "r", flags|PHP_STREAM_URL_STAT_QUIET)) == NULL) {
|
||||
|
@ -665,7 +665,7 @@ static int phar_wrapper_unlink(php_stream_wrapper *wrapper, const char *url, int
|
|||
int internal_file_len;
|
||||
phar_entry_data *idata;
|
||||
phar_archive_data *pphar;
|
||||
uint host_len;
|
||||
uint32_t host_len;
|
||||
|
||||
if ((resource = phar_parse_url(wrapper, url, "rb", options)) == NULL) {
|
||||
php_stream_wrapper_log_error(wrapper, options, "phar error: unlink failed");
|
||||
|
@ -738,7 +738,7 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from
|
|||
char *error;
|
||||
phar_archive_data *phar, *pfrom, *pto;
|
||||
phar_entry_info *entry;
|
||||
uint host_len;
|
||||
uint32_t host_len;
|
||||
int is_dir = 0;
|
||||
int is_modified = 0;
|
||||
|
||||
|
@ -882,8 +882,8 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, const char *url_from
|
|||
Bucket *b;
|
||||
zend_string *str_key;
|
||||
zend_string *new_str_key;
|
||||
uint from_len = strlen(resource_from->path+1);
|
||||
uint to_len = strlen(resource_to->path+1);
|
||||
uint32_t from_len = strlen(resource_from->path+1);
|
||||
uint32_t to_len = strlen(resource_to->path+1);
|
||||
|
||||
ZEND_HASH_FOREACH_BUCKET(&phar->manifest, b) {
|
||||
str_key = b->key;
|
||||
|
|
|
@ -315,7 +315,7 @@ bail:
|
|||
if (((hdr->typeflag == '\0') || (hdr->typeflag == TAR_FILE)) && size > 0) {
|
||||
/* this is not good enough - seek succeeds even on truncated tars */
|
||||
php_stream_seek(fp, 512, SEEK_CUR);
|
||||
if ((uint)php_stream_tell(fp) > totalsize) {
|
||||
if ((uint32_t)php_stream_tell(fp) > totalsize) {
|
||||
if (error) {
|
||||
spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
|
||||
}
|
||||
|
@ -383,7 +383,7 @@ bail:
|
|||
|
||||
/* this is not good enough - seek succeeds even on truncated tars */
|
||||
php_stream_seek(fp, size, SEEK_CUR);
|
||||
if ((uint)php_stream_tell(fp) > totalsize) {
|
||||
if ((uint32_t)php_stream_tell(fp) > totalsize) {
|
||||
efree(entry.filename);
|
||||
if (error) {
|
||||
spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
|
||||
|
@ -570,7 +570,7 @@ bail:
|
|||
next:
|
||||
/* this is not good enough - seek succeeds even on truncated tars */
|
||||
php_stream_seek(fp, size, SEEK_CUR);
|
||||
if ((uint)php_stream_tell(fp) > totalsize) {
|
||||
if ((uint32_t)php_stream_tell(fp) > totalsize) {
|
||||
if (error) {
|
||||
spprintf(error, 4096, "phar error: \"%s\" is a corrupted tar file (truncated)", fname);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ static void delete_service(void *service);
|
|||
static void delete_url(void *handle);
|
||||
static void delete_hashtable(void *hashtable);
|
||||
|
||||
static void soap_error_handler(int error_num, const char *error_filename, const uint error_lineno, const char *format, va_list args);
|
||||
static void soap_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args);
|
||||
|
||||
#define SOAP_SERVER_BEGIN_CODE() \
|
||||
zend_bool _old_handler = SOAP_GLOBAL(use_soap_error_handler);\
|
||||
|
@ -2126,7 +2126,7 @@ static void soap_server_fault(char* code, char* string, char *actor, zval* detai
|
|||
zend_bailout();
|
||||
}
|
||||
|
||||
static void soap_error_handler(int error_num, const char *error_filename, const uint error_lineno, const char *format, va_list args)
|
||||
static void soap_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args)
|
||||
{
|
||||
zend_bool _old_in_compilation;
|
||||
zend_execute_data *_old_current_execute_data;
|
||||
|
|
|
@ -1194,7 +1194,7 @@ static void to_zval_read_iov(const char *msghdr_c, zval *zv, res_context *ctx)
|
|||
do_to_zval_err(ctx, "unexpectedly large value for iov_len: %lu",
|
||||
(unsigned long)iovlen);
|
||||
}
|
||||
array_init_size(zv, (uint)iovlen);
|
||||
array_init_size(zv, (uint32_t)iovlen);
|
||||
|
||||
if ((recvmsg_ret = zend_hash_str_find_ptr(&ctx->params, KEY_RECVMSG_RET, sizeof(KEY_RECVMSG_RET) - 1)) == NULL) {
|
||||
do_to_zval_err(ctx, "recvmsg_ret not found in params. This is a bug");
|
||||
|
@ -1202,7 +1202,7 @@ static void to_zval_read_iov(const char *msghdr_c, zval *zv, res_context *ctx)
|
|||
}
|
||||
bytes_left = *recvmsg_ret;
|
||||
|
||||
for (i = 0; bytes_left > 0 && i < (uint)iovlen; i++) {
|
||||
for (i = 0; bytes_left > 0 && i < (uint32_t)iovlen; i++) {
|
||||
zval elem;
|
||||
size_t len = MIN(msghdr->msg_iov[i].iov_len, (size_t)bytes_left);
|
||||
zend_string *buf = zend_string_alloc(len, 0);
|
||||
|
|
|
@ -2197,7 +2197,7 @@ static int spl_filesystem_file_is_empty_line(spl_filesystem_object *intern) /* {
|
|||
case IS_ARRAY:
|
||||
if (SPL_HAS_FLAG(intern->flags, SPL_FILE_OBJECT_READ_CSV)
|
||||
&& zend_hash_num_elements(Z_ARRVAL(intern->u.file.current_zval)) == 1) {
|
||||
uint idx = 0;
|
||||
uint32_t idx = 0;
|
||||
zval *first;
|
||||
|
||||
while (Z_ISUNDEF(Z_ARRVAL(intern->u.file.current_zval)->arData[idx].val)) {
|
||||
|
|
|
@ -3766,7 +3766,7 @@ static void array_bucketindex_swap(void *p, void *q) /* {{{ */
|
|||
PHP_FUNCTION(array_unique)
|
||||
{
|
||||
zval *array;
|
||||
uint idx;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
struct bucketindex *arTmp, *cmpdata, *lastkept;
|
||||
unsigned int i;
|
||||
|
@ -3862,7 +3862,7 @@ static int zval_user_compare(zval *a, zval *b) /* {{{ */
|
|||
|
||||
static void php_array_intersect_key(INTERNAL_FUNCTION_PARAMETERS, int data_compare_type) /* {{{ */
|
||||
{
|
||||
uint idx;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
int argc, i;
|
||||
zval *args;
|
||||
|
@ -3963,7 +3963,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
|
|||
zval *args = NULL;
|
||||
HashTable *hash;
|
||||
int arr_argc, i, c = 0;
|
||||
uint idx;
|
||||
uint32_t idx;
|
||||
Bucket **lists, *list, **ptrs, *p;
|
||||
uint32_t req_args;
|
||||
char *param_spec;
|
||||
|
@ -4290,7 +4290,7 @@ PHP_FUNCTION(array_uintersect_uassoc)
|
|||
|
||||
static void php_array_diff_key(INTERNAL_FUNCTION_PARAMETERS, int data_compare_type) /* {{{ */
|
||||
{
|
||||
uint idx;
|
||||
uint32_t idx;
|
||||
Bucket *p;
|
||||
int argc, i;
|
||||
zval *args;
|
||||
|
@ -4386,7 +4386,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
|
|||
zval *args = NULL;
|
||||
HashTable *hash;
|
||||
int arr_argc, i, c;
|
||||
uint idx;
|
||||
uint32_t idx;
|
||||
Bucket **lists, *list, **ptrs, *p;
|
||||
uint32_t req_args;
|
||||
char *param_spec;
|
||||
|
@ -4819,7 +4819,7 @@ PHP_FUNCTION(array_multisort)
|
|||
zval* args;
|
||||
zval** arrays;
|
||||
Bucket** indirect;
|
||||
uint idx;
|
||||
uint32_t idx;
|
||||
Bucket* p;
|
||||
HashTable* hash;
|
||||
int argc;
|
||||
|
|
|
@ -215,7 +215,7 @@ PHP_FUNCTION(assert)
|
|||
zval *args = safe_emalloc(!description ? 3 : 4, sizeof(zval), 0);
|
||||
zval retval;
|
||||
int i;
|
||||
uint lineno = zend_get_executed_lineno();
|
||||
uint32_t lineno = zend_get_executed_lineno();
|
||||
const char *filename = zend_get_executed_filename();
|
||||
|
||||
ZVAL_STRING(&args[0], SAFE_STRING(filename));
|
||||
|
|
|
@ -4633,7 +4633,7 @@ PHP_FUNCTION(get_cfg_var)
|
|||
return;
|
||||
}
|
||||
|
||||
retval = cfg_get_entry(varname, (uint)varname_len);
|
||||
retval = cfg_get_entry(varname, (uint32_t)varname_len);
|
||||
|
||||
if (retval) {
|
||||
if (Z_TYPE_P(retval) == IS_ARRAY) {
|
||||
|
@ -5295,7 +5295,7 @@ PHP_FUNCTION(ini_get)
|
|||
return;
|
||||
}
|
||||
|
||||
str = zend_ini_string(varname, (uint)varname_len, 0);
|
||||
str = zend_ini_string(varname, (uint32_t)varname_len, 0);
|
||||
|
||||
if (!str) {
|
||||
RETURN_FALSE;
|
||||
|
|
|
@ -468,7 +468,7 @@ static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_t
|
|||
|
||||
if (raw) {
|
||||
add_assoc_long(subarray, "type", type);
|
||||
add_assoc_stringl(subarray, "data", (char*) cp, (uint) dlen);
|
||||
add_assoc_stringl(subarray, "data", (char*) cp, (uint32_t) dlen);
|
||||
cp += dlen;
|
||||
return cp;
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ static void php_parserr(PDNS_RECORD pRec, int type_to_fetch, int store, int raw,
|
|||
|
||||
if (raw) {
|
||||
add_assoc_long(subarray, "type", type);
|
||||
add_assoc_stringl(subarray, "data", (char*) &pRec->Data, (uint) pRec->wDataLength);
|
||||
add_assoc_stringl(subarray, "data", (char*) &pRec->Data, (uint32_t) pRec->wDataLength);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ PHP_FUNCTION(header)
|
|||
&len, &rep, &ctr.response_code) == FAILURE)
|
||||
return;
|
||||
|
||||
ctr.line_len = (uint)len;
|
||||
ctr.line_len = (uint32_t)len;
|
||||
sapi_header_op(rep ? SAPI_HEADER_REPLACE:SAPI_HEADER_ADD, &ctr);
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -62,7 +62,7 @@ PHP_FUNCTION(header_remove)
|
|||
&len) == FAILURE)
|
||||
return;
|
||||
|
||||
ctr.line_len = (uint)len;
|
||||
ctr.line_len = (uint32_t)len;
|
||||
sapi_header_op(ZEND_NUM_ARGS() == 0 ? SAPI_HEADER_DELETE_ALL : SAPI_HEADER_DELETE, &ctr);
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -174,7 +174,7 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
|
|||
}
|
||||
|
||||
ctr.line = cookie;
|
||||
ctr.line_len = (uint)strlen(cookie);
|
||||
ctr.line_len = (uint32_t)strlen(cookie);
|
||||
|
||||
result = sapi_header_op(SAPI_HEADER_ADD, &ctr);
|
||||
efree(cookie);
|
||||
|
|
|
@ -188,7 +188,7 @@ static int _display_module_info_def(zval *el) /* {{{ */
|
|||
|
||||
/* {{{ php_print_gpcse_array
|
||||
*/
|
||||
static void php_print_gpcse_array(char *name, uint name_length)
|
||||
static void php_print_gpcse_array(char *name, uint32_t name_length)
|
||||
{
|
||||
zval *data, *tmp, tmp2;
|
||||
zend_string *string_key;
|
||||
|
|
|
@ -413,7 +413,7 @@ void php_mail_log_to_syslog(char *message) {
|
|||
|
||||
void php_mail_log_to_file(char *filename, char *message, size_t message_size) {
|
||||
/* Write 'message' to the given file. */
|
||||
uint flags = IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR;
|
||||
uint32_t flags = IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR;
|
||||
php_stream *stream = php_stream_open_wrapper(filename, "a", flags, NULL);
|
||||
if (stream) {
|
||||
php_stream_write(stream, message, message_size);
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
|
||||
#if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
|
||||
# define _BSD_SOURCE /* linux wants this when XOPEN mode is on */
|
||||
# define _BSD_COMPAT /* irix: uint */
|
||||
# define _BSD_COMPAT /* irix: uint32_t */
|
||||
# define _XOPEN_SOURCE 500 /* turn on Unix98 */
|
||||
# define __EXTENSIONS__ 1 /* Solaris: uint */
|
||||
# define __EXTENSIONS__ 1 /* Solaris: uint32_t */
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
|
@ -146,7 +146,7 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent
|
|||
zend_string_release(str);
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
|
||||
assert((uint)(p - env.envp) <= sizeenv);
|
||||
assert((uint32_t)(p - env.envp) <= sizeenv);
|
||||
|
||||
zend_hash_destroy(env_hash);
|
||||
FREE_HASHTABLE(env_hash);
|
||||
|
|
|
@ -1170,7 +1170,7 @@ static inline void php_url_scanner_session_handler_impl(char *output, size_t out
|
|||
|
||||
if (ZSTR_LEN(url_state->url_app.s) != 0) {
|
||||
*handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT | PHP_OUTPUT_HANDLER_FLUSH | PHP_OUTPUT_HANDLER_FINAL) ? 1 : 0), url_state);
|
||||
if (sizeof(uint) < sizeof(size_t)) {
|
||||
if (sizeof(uint32_t) < sizeof(size_t)) {
|
||||
if (len > UINT_MAX)
|
||||
len = UINT_MAX;
|
||||
}
|
||||
|
|
|
@ -618,7 +618,7 @@ static void php_tidy_quick_repair(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_fil
|
|||
TidyBuffer buf;
|
||||
|
||||
tidyBufInit(&buf);
|
||||
tidyBufAttach(&buf, (byte *) ZSTR_VAL(data), (uint)ZSTR_LEN(data));
|
||||
tidyBufAttach(&buf, (byte *) ZSTR_VAL(data), (uint32_t)ZSTR_LEN(data));
|
||||
|
||||
if (tidyParseBuffer(doc, &buf) < 0) {
|
||||
php_error_docref(NULL, E_WARNING, "%s", errbuf->bp);
|
||||
|
@ -1013,7 +1013,7 @@ static int _php_tidy_apply_config_array(TidyDoc doc, HashTable *ht_options)
|
|||
return SUCCESS;
|
||||
}
|
||||
|
||||
static int php_tidy_parse_string(PHPTidyObj *obj, char *string, uint len, char *enc)
|
||||
static int php_tidy_parse_string(PHPTidyObj *obj, char *string, uint32_t len, char *enc)
|
||||
{
|
||||
TidyBuffer buf;
|
||||
|
||||
|
@ -1179,7 +1179,7 @@ static int php_tidy_output_handler(void **nothing, php_output_context *output_co
|
|||
TIDY_SET_DEFAULT_CONFIG(doc);
|
||||
|
||||
tidyBufInit(&inbuf);
|
||||
tidyBufAttach(&inbuf, (byte *) output_context->in.data, (uint)output_context->in.used);
|
||||
tidyBufAttach(&inbuf, (byte *) output_context->in.data, (uint32_t)output_context->in.used);
|
||||
|
||||
if (0 <= tidyParseBuffer(doc, &inbuf) && 0 <= tidyCleanAndRepair(doc)) {
|
||||
tidyBufInit(&outbuf);
|
||||
|
@ -1223,7 +1223,7 @@ static PHP_FUNCTION(tidy_parse_string)
|
|||
|
||||
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
|
||||
|
||||
if (php_tidy_parse_string(obj, ZSTR_VAL(input), (uint)ZSTR_LEN(input), enc) == FAILURE) {
|
||||
if (php_tidy_parse_string(obj, ZSTR_VAL(input), (uint32_t)ZSTR_LEN(input), enc) == FAILURE) {
|
||||
zval_ptr_dtor(return_value);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
@ -1291,7 +1291,7 @@ static PHP_FUNCTION(tidy_parse_file)
|
|||
|
||||
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
|
||||
|
||||
if (php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint)ZSTR_LEN(contents), enc) == FAILURE) {
|
||||
if (php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint32_t)ZSTR_LEN(contents), enc) == FAILURE) {
|
||||
zval_ptr_dtor(return_value);
|
||||
RETVAL_FALSE;
|
||||
}
|
||||
|
@ -1609,7 +1609,7 @@ static TIDY_DOC_METHOD(__construct)
|
|||
|
||||
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
|
||||
|
||||
php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint)ZSTR_LEN(contents), enc);
|
||||
php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint32_t)ZSTR_LEN(contents), enc);
|
||||
|
||||
zend_string_release(contents);
|
||||
}
|
||||
|
@ -1645,7 +1645,7 @@ static TIDY_DOC_METHOD(parseFile)
|
|||
|
||||
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
|
||||
|
||||
if (php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint)ZSTR_LEN(contents), enc) == FAILURE) {
|
||||
if (php_tidy_parse_string(obj, ZSTR_VAL(contents), (uint32_t)ZSTR_LEN(contents), enc) == FAILURE) {
|
||||
RETVAL_FALSE;
|
||||
} else {
|
||||
RETVAL_TRUE;
|
||||
|
@ -1677,7 +1677,7 @@ static TIDY_DOC_METHOD(parseString)
|
|||
|
||||
TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);
|
||||
|
||||
if(php_tidy_parse_string(obj, ZSTR_VAL(input), (uint)ZSTR_LEN(input), enc) == SUCCESS) {
|
||||
if(php_tidy_parse_string(obj, ZSTR_VAL(input), (uint32_t)ZSTR_LEN(input), enc) == SUCCESS) {
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ static int add_string(zval* list, char* id, char* string) {
|
|||
else return add_next_index_string(list, string);
|
||||
}
|
||||
|
||||
static int add_stringl(zval* list, char* id, char* string, uint length) {
|
||||
static int add_stringl(zval* list, char* id, char* string, uint32_t length) {
|
||||
if(id) return add_assoc_stringl(list, id, string, length);
|
||||
else return add_next_index_stringl(list, string, length);
|
||||
}
|
||||
|
|
|
@ -499,7 +499,7 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
|
|||
char *result;
|
||||
#endif
|
||||
glob_t globbuf;
|
||||
uint n;
|
||||
uint32_t n;
|
||||
int ret;
|
||||
|
||||
if (pattern_len >= MAXPATHLEN) {
|
||||
|
|
22
main/SAPI.c
22
main/SAPI.c
|
@ -180,7 +180,7 @@ SAPI_API void sapi_handle_post(void *arg)
|
|||
static void sapi_read_post_data(void)
|
||||
{
|
||||
sapi_post_entry *post_entry;
|
||||
uint content_type_length = (uint)strlen(SG(request_info).content_type);
|
||||
uint32_t content_type_length = (uint32_t)strlen(SG(request_info).content_type);
|
||||
char *content_type = estrndup(SG(request_info).content_type, content_type_length);
|
||||
char *p;
|
||||
char oldchar=0;
|
||||
|
@ -302,21 +302,21 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data)
|
|||
}
|
||||
|
||||
|
||||
static inline char *get_default_content_type(uint prefix_len, uint *len)
|
||||
static inline char *get_default_content_type(uint32_t prefix_len, uint32_t *len)
|
||||
{
|
||||
char *mimetype, *charset, *content_type;
|
||||
uint mimetype_len, charset_len;
|
||||
uint32_t mimetype_len, charset_len;
|
||||
|
||||
if (SG(default_mimetype)) {
|
||||
mimetype = SG(default_mimetype);
|
||||
mimetype_len = (uint)strlen(SG(default_mimetype));
|
||||
mimetype_len = (uint32_t)strlen(SG(default_mimetype));
|
||||
} else {
|
||||
mimetype = SAPI_DEFAULT_MIMETYPE;
|
||||
mimetype_len = sizeof(SAPI_DEFAULT_MIMETYPE) - 1;
|
||||
}
|
||||
if (SG(default_charset)) {
|
||||
charset = SG(default_charset);
|
||||
charset_len = (uint)strlen(SG(default_charset));
|
||||
charset_len = (uint32_t)strlen(SG(default_charset));
|
||||
} else {
|
||||
charset = SAPI_DEFAULT_CHARSET;
|
||||
charset_len = sizeof(SAPI_DEFAULT_CHARSET) - 1;
|
||||
|
@ -344,7 +344,7 @@ static inline char *get_default_content_type(uint prefix_len, uint *len)
|
|||
|
||||
SAPI_API char *sapi_get_default_content_type(void)
|
||||
{
|
||||
uint len;
|
||||
uint32_t len;
|
||||
|
||||
return get_default_content_type(0, &len);
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ SAPI_API char *sapi_get_default_content_type(void)
|
|||
|
||||
SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_header)
|
||||
{
|
||||
uint len;
|
||||
uint32_t len;
|
||||
|
||||
default_header->header = get_default_content_type(sizeof("Content-type: ")-1, &len);
|
||||
default_header->header_len = len;
|
||||
|
@ -733,7 +733,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
|
|||
return SUCCESS;
|
||||
} else {
|
||||
/* new line/NUL character safety check */
|
||||
uint i;
|
||||
uint32_t i;
|
||||
for (i = 0; i < header_line_len; i++) {
|
||||
/* RFC 7230 ch. 3.2.4 deprecates folding support */
|
||||
if (header_line[i] == '\n' || header_line[i] == '\r') {
|
||||
|
@ -795,7 +795,7 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
|
|||
PHP_STRLCPY(newheader, "Content-type: ", newlen, sizeof("Content-type: ")-1);
|
||||
strlcat(newheader, mimetype, newlen);
|
||||
sapi_header.header = newheader;
|
||||
sapi_header.header_len = (uint)(newlen - 1);
|
||||
sapi_header.header_len = (uint32_t)(newlen - 1);
|
||||
efree(header_line);
|
||||
}
|
||||
efree(mimetype);
|
||||
|
@ -855,7 +855,7 @@ SAPI_API int sapi_send_headers(void)
|
|||
* in case of an error situation.
|
||||
*/
|
||||
if (SG(sapi_headers).send_default_content_type && sapi_module.send_headers) {
|
||||
uint len = 0;
|
||||
uint32_t len = 0;
|
||||
char *default_mimetype = get_default_content_type(0, &len);
|
||||
|
||||
if (default_mimetype && len) {
|
||||
|
@ -902,7 +902,7 @@ SAPI_API int sapi_send_headers(void)
|
|||
|
||||
if (SG(sapi_headers).http_status_line) {
|
||||
http_status_line.header = SG(sapi_headers).http_status_line;
|
||||
http_status_line.header_len = (uint)strlen(SG(sapi_headers).http_status_line);
|
||||
http_status_line.header_len = (uint32_t)strlen(SG(sapi_headers).http_status_line);
|
||||
} else {
|
||||
http_status_line.header = buf;
|
||||
http_status_line.header_len = slprintf(buf, sizeof(buf), "HTTP/1.0 %d X", SG(sapi_headers).http_response_code);
|
||||
|
|
|
@ -273,7 +273,7 @@ struct _sapi_module_struct {
|
|||
|
||||
struct _sapi_post_entry {
|
||||
char *content_type;
|
||||
uint content_type_len;
|
||||
uint32_t content_type_len;
|
||||
void (*post_reader)(void);
|
||||
void (*post_handler)(char *content_type_dup, void *arg);
|
||||
};
|
||||
|
|
|
@ -998,7 +998,7 @@ PHPAPI void php_html_puts(const char *str, size_t size)
|
|||
|
||||
/* {{{ php_error_cb
|
||||
extended error handling function */
|
||||
static ZEND_COLD void php_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args)
|
||||
static ZEND_COLD void php_error_cb(int type, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args)
|
||||
{
|
||||
char *buffer;
|
||||
int buffer_len, display;
|
||||
|
@ -2042,7 +2042,7 @@ void dummy_invalid_parameter_handler(
|
|||
|
||||
/* {{{ php_module_startup
|
||||
*/
|
||||
int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint num_additional_modules)
|
||||
int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint32_t num_additional_modules)
|
||||
{
|
||||
zend_utility_functions zuf;
|
||||
zend_utility_values zuv;
|
||||
|
@ -2229,7 +2229,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod
|
|||
|
||||
zuv.html_errors = 1;
|
||||
zuv.import_use_extension = ".php";
|
||||
zuv.import_use_extension_length = (uint)strlen(zuv.import_use_extension);
|
||||
zuv.import_use_extension_length = (uint32_t)strlen(zuv.import_use_extension);
|
||||
php_startup_auto_globals();
|
||||
zend_set_utility_values(&zuv);
|
||||
php_startup_sapi_content_types();
|
||||
|
|
|
@ -30,7 +30,7 @@ BEGIN_EXTERN_C()
|
|||
PHPAPI int php_request_startup(void);
|
||||
PHPAPI void php_request_shutdown(void *dummy);
|
||||
PHPAPI void php_request_shutdown_for_exec(void *dummy);
|
||||
PHPAPI int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint num_additional_modules);
|
||||
PHPAPI int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_modules, uint32_t num_additional_modules);
|
||||
PHPAPI void php_module_shutdown(void);
|
||||
PHPAPI void php_module_shutdown_for_exec(void);
|
||||
PHPAPI int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals);
|
||||
|
|
|
@ -94,8 +94,8 @@ typedef struct _php_output_buffer {
|
|||
char *data;
|
||||
size_t size;
|
||||
size_t used;
|
||||
uint free:1;
|
||||
uint _reserved:31;
|
||||
uint32_t free:1;
|
||||
uint32_t _reserved:31;
|
||||
} php_output_buffer;
|
||||
|
||||
typedef struct _php_output_context {
|
||||
|
|
|
@ -536,7 +536,7 @@ void _php_import_environment_variables(zval *array_ptr)
|
|||
}
|
||||
}
|
||||
|
||||
zend_bool php_std_auto_global_callback(char *name, uint name_len)
|
||||
zend_bool php_std_auto_global_callback(char *name, uint32_t name_len)
|
||||
{
|
||||
zend_printf("%s\n", name);
|
||||
return 0; /* don't rearm */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue