com php-src: next wave on fixes for ext/phpdbg: sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg.h sapi/phpdbg/phpdbg_bp.c sapi/phpdbg/ phpdbg_bp.h
sapi/phpdbg/phpdbg_cmd.c sapi/phpdbg/ph pdbg_cmd.h sapi/phpdbg/phpdbg_frame.c sapi/phpdbg/p hpdbg_frame.h sapi/phpdbg/phpdbg_list.c sapi/phpdbg
/phpdbg_list.h sapi/phpdbg/phpdbg_prompt.c

From: Date: Tue, 24 Dec 2013 20:59:44 +0000
Subject: com php-src: next wave on fixes for ext/phpdbg: sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg.h sapi/phpdbg/phpdbg_bp.c sapi/phpdbg/ phpdbg_bp.h
sapi/phpdbg/phpdbg_cmd.c sapi/phpdbg/ph pdbg_cmd.h sapi/phpdbg/phpdbg_frame.c sapi/phpdbg/p hpdbg_frame.h sapi/phpdbg/phpdbg_list.c sapi/phpdbg
/phpdbg_list.h sapi/phpdbg/phpdbg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-75458@lists.php.net to get a copy of this message
Commit: 0493099786b6135f1fe2f5de763f1edc61428303 Author: Anatol Belski <ab@php.net> Tue, 24 Dec 2013 21:59:44 +0100 Parents: 5ae8f624a1cb3929b567cc47c634297b1a3e7915 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0493099786b6135f1fe2f5de763f1edc61428303 Log: next wave on fixes for ext/phpdbg Changed paths: M sapi/phpdbg/phpdbg.c M sapi/phpdbg/phpdbg..h M sapi/phpdbg/phpdbg_bp.c M sapi/phpdbg/phpdbg_bp.h M sapi/phpdbg/phpdbg_cmd.c M sapi/phpdbg/phpdbg_cmd.h M sapi/phpdbg/phpdbg_frame.c M sapi/phpdbg/phpdbg_frame.h M sapi/phpdbg/phpdbg_list.c M sapi/phpdbg/phpdbg_list.h M sapi/phpdbg/phpdbg_prompt.c

diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index f758035..05cbf5b 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -223,7 +223,7 @@ static PHP_FUNCTION(phpdbg_exec) } { - struct stat sb; + zend_stat_t sb; zend_bool result = 1; if (VCWD_STAT(exec, &sb) != FAILURE) { @@ -293,7 +293,7 @@ static PHP_FUNCTION(phpdbg_break) phpdbg_clear_param(&param TSRMLS_CC); } else if (EG(current_execute_data) && EG(active_op_array)) { - zend_ulong opline_num = (EG(current_execute_data)->opline - + php_uint_t opline_num = (EG(current_execute_data)->opline - EG(active_op_array)->opcodes); phpdbg_set_breakpoint_opline_ex( @@ -808,9 +808,9 @@ int main(int argc, char **argv) /* {{{ */ sapi_module_struct *phpdbg = &phpdbg_sapi_module; char *sapi_name; char *ini_entries; - int ini_entries_len; + php_size_t ini_entries_len; char **zend_extensions = NULL; - zend_ulong zend_extensions_len = 0L; + php_uint_t zend_extensions_len = 0L; zend_bool ini_ignore; char *ini_override; char *exec; @@ -823,7 +823,7 @@ int main(int argc, char **argv) /* {{{ */ zend_ulong flags; char *php_optarg; int php_optind, opt, show_banner = 1; - long cleaning = 0; + php_int_t cleaning = 0; zend_bool remote = 0; int run = 0; int step = 0; @@ -910,7 +910,7 @@ phpdbg_main: ini_override = strdup(php_optarg); break; case 'd': { - int len = strlen(php_optarg); + size_t len = strlen(php_optarg); char *val; if ((val = strchr(php_optarg, '='))) { diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h index 3a3da76..424941e 100644 --- a/sapi/phpdbg/phpdbg.h +++ b/sapi/phpdbg/phpdbg.h @@ -182,7 +182,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phpdbg) phpdbg_command_t *lcmd; /* last command */ phpdbg_param_t lparam; /* last param */ - zend_ulong flags; /* phpdbg flags */ + php_uint_t flags; /* phpdbg flags */ ZEND_END_MODULE_GLOBALS(phpdbg) /* }}} */ #endif /* PHPDBG_H */ diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index 0c1955c..1bd05cf 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -114,7 +114,7 @@ PHPDBG_API void phpdbg_export_breakpoints(FILE *handle TSRMLS_DC) /* {{{ */ { HashPosition position[2]; HashTable **table = NULL; - php_uint_t id = Z_I(0); + php_uint_t id = Z_UI(0); if (zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP])) { phpdbg_notice( @@ -219,9 +219,9 @@ PHPDBG_API void phpdbg_export_breakpoints(FILE *handle TSRMLS_DC) /* {{{ */ } } /* }}} */ -PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, long line_num TSRMLS_DC) /* {{{ */ +PHPDBG_API void phpdbg_set_breakpoint_file(const char *path, php_int_t line_num TSRMLS_DC) /* {{{ */ { - struct stat sb; + zend_stat_t sb; if (VCWD_STAT(path, &sb) != FAILURE) { if (sb.st_mode & (S_IFREG|S_IFLNK)) { @@ -329,7 +329,7 @@ PHPDBG_API void phpdbg_set_breakpoint_method(const char *class_name, const char efree(lcname); } /* }}} */ -PHPDBG_API void phpdbg_set_breakpoint_opline(zend_ulong opline TSRMLS_DC) /* {{{ */ +PHPDBG_API void phpdbg_set_breakpoint_opline(php_uint_t opline TSRMLS_DC) /* {{{ */ { if (!zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], opline)) { phpdbg_breakline_t new_break; @@ -370,7 +370,7 @@ PHPDBG_API int phpdbg_resolve_op_array_break(phpdbg_breakopline_t *brake, zend_o opline_break.disabled = 0; opline_break.hits = 0; opline_break.id = brake->id; - opline_break.opline = brake->opline = (zend_ulong)(op_array->opcodes + brake->opline_num); + opline_break.opline = brake->opline = (php_uint_t)(op_array->opcodes + brake->opline_num); opline_break.name = NULL; opline_break.base = brake; if (op_array->scope) { @@ -490,7 +490,7 @@ PHPDBG_API int phpdbg_resolve_opline_break(phpdbg_breakopline_t *new_break TSRML return SUCCESS; } /* }}} */ -PHPDBG_API void phpdbg_set_breakpoint_method_opline(const char *class, const char *method, zend_ulong opline TSRMLS_DC) /* {{{ */ +PHPDBG_API void phpdbg_set_breakpoint_method_opline(const char *class, const char *method, php_uint_t opline TSRMLS_DC) /* {{{ */ { phpdbg_breakopline_t new_break; HashTable class_breaks, *class_table; @@ -550,7 +550,7 @@ PHPDBG_API void phpdbg_set_breakpoint_method_opline(const char *class, const cha zend_hash_index_update(method_table, opline, &new_break, sizeof(phpdbg_breakopline_t), NULL); } -PHPDBG_API void phpdbg_set_breakpoint_function_opline(const char *function, zend_ulong opline TSRMLS_DC) /* {{{ */ +PHPDBG_API void phpdbg_set_breakpoint_function_opline(const char *function, php_uint_t opline TSRMLS_DC) /* {{{ */ { phpdbg_breakopline_t new_break; HashTable func_breaks, *func_table; @@ -599,7 +599,7 @@ PHPDBG_API void phpdbg_set_breakpoint_function_opline(const char *function, zend zend_hash_index_update(func_table, opline, &new_break, sizeof(phpdbg_breakopline_t), NULL); } -PHPDBG_API void phpdbg_set_breakpoint_file_opline(const char *file, zend_ulong opline TSRMLS_DC) /* {{{ */ +PHPDBG_API void phpdbg_set_breakpoint_file_opline(const char *file, php_uint_t opline TSRMLS_DC) /* {{{ */ { phpdbg_breakopline_t new_break; HashTable file_breaks, *file_table; @@ -651,7 +651,7 @@ PHPDBG_API void phpdbg_set_breakpoint_file_opline(const char *file, zend_ulong o PHPDBG_API void phpdbg_set_breakpoint_opcode(const char *name, size_t name_len TSRMLS_DC) /* {{{ */ { phpdbg_breakop_t new_break; - zend_ulong hash = zend_hash_func(name, name_len); + php_uint_t hash = zend_hash_func(name, name_len); if (zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_OPCODE], hash)) { phpdbg_notice( @@ -674,16 +674,16 @@ PHPDBG_API void phpdbg_set_breakpoint_opcode(const char *name, size_t name_len T PHPDBG_API void phpdbg_set_breakpoint_opline_ex(phpdbg_opline_ptr_t opline TSRMLS_DC) /* {{{ */ { - if (!zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], (zend_ulong) opline)) { + if (!zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], (php_uint_t) opline)) { phpdbg_breakline_t new_break; PHPDBG_G(flags) |= PHPDBG_HAS_OPLINE_BP; PHPDBG_BREAK_INIT(new_break, PHPDBG_BREAK_OPLINE); - new_break.opline = (zend_ulong) opline; + new_break.opline = (php_uint_t) opline; zend_hash_index_update(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], - (zend_ulong) opline, &new_break, sizeof(phpdbg_breakline_t), NULL); + (php_uint_t) opline, &new_break, sizeof(phpdbg_breakline_t), NULL); phpdbg_notice("Breakpoint #%d added at %#lx", new_break.id, new_break.opline); @@ -691,7 +691,7 @@ PHPDBG_API void phpdbg_set_breakpoint_opline_ex(phpdbg_opline_ptr_t opline TSRML } } /* }}} */ -static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, const phpdbg_param_t *param, const char *expr, size_t expr_len, zend_ulong hash TSRMLS_DC) /* {{{ */ +static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, const phpdbg_param_t *param, const char *expr, size_t expr_len, php_uint_t hash TSRMLS_DC) /* {{{ */ { phpdbg_breakcond_t new_break; zend_uint cops = CG(compiler_options); @@ -749,7 +749,7 @@ static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, co PHPDBG_API void phpdbg_set_breakpoint_expression(const char *expr, size_t expr_len TSRMLS_DC) /* {{{ */ { - zend_ulong expr_hash = zend_inline_hash_func(expr, expr_len); + php_uint_t expr_hash = zend_inline_hash_func(expr, expr_len); phpdbg_breakcond_t new_break; if (!zend_hash_index_exists(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], expr_hash)) { @@ -766,7 +766,7 @@ PHPDBG_API void phpdbg_set_breakpoint_at(const phpdbg_param_t *param, const phpd phpdbg_breakcond_t new_break; phpdbg_param_t new_param; - zend_ulong expr_hash = 0L; + php_uint_t expr_hash = Z_UI(0); size_t expr_len; const char *join = strstr(input->string, "if"); const char *expr = (join) + sizeof("if"); @@ -889,7 +889,7 @@ static inline phpdbg_breakbase_t *phpdbg_find_breakpoint_opline(phpdbg_opline_pt phpdbg_breakline_t *brake; if (zend_hash_index_find(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE], - (zend_ulong) opline, (void**)&brake) == SUCCESS) { + (php_uint_t) opline, (void**)&brake) == SUCCESS) { return (brake->base?(phpdbg_breakbase_t *)brake->base:(phpdbg_breakbase_t *)brake); } @@ -974,7 +974,7 @@ static inline zend_bool phpdbg_find_breakpoint_param(phpdbg_param_t *param, zend } break; case ADDR_PARAM: { - return ((zend_ulong)(phpdbg_opline_ptr_t)execute_data->opline == param->addr); + return ((php_uint_t)(phpdbg_opline_ptr_t)execute_data->opline == param->addr); } break; default: { @@ -1108,7 +1108,7 @@ result: return base; } /* }}} */ -PHPDBG_API void phpdbg_delete_breakpoint(zend_ulong num TSRMLS_DC) /* {{{ */ +PHPDBG_API void phpdbg_delete_breakpoint(php_uint_t num TSRMLS_DC) /* {{{ */ { HashTable **table; HashPosition position; @@ -1320,7 +1320,7 @@ unknown: } } /* }}} */ -PHPDBG_API void phpdbg_enable_breakpoint(zend_ulong id TSRMLS_DC) /* {{{ */ +PHPDBG_API void phpdbg_enable_breakpoint(php_uint_t id TSRMLS_DC) /* {{{ */ { phpdbg_breakbase_t *brake = phpdbg_find_breakbase(id TSRMLS_CC); @@ -1329,7 +1329,7 @@ PHPDBG_API void phpdbg_enable_breakpoint(zend_ulong id TSRMLS_DC) /* {{{ */ } } /* }}} */ -PHPDBG_API void phpdbg_disable_breakpoint(zend_ulong id TSRMLS_DC) /* {{{ */ +PHPDBG_API void phpdbg_disable_breakpoint(php_uint_t id TSRMLS_DC) /* {{{ */ { phpdbg_breakbase_t *brake = phpdbg_find_breakbase(id TSRMLS_CC); @@ -1347,7 +1347,7 @@ PHPDBG_API void phpdbg_disable_breakpoints(TSRMLS_D) { /* {{{ */ PHPDBG_G(flags) &= ~PHPDBG_IS_BP_ENABLED; } /* }}} */ -PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase(zend_ulong id TSRMLS_DC) /* {{{ */ +PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase(php_uint_t id TSRMLS_DC) /* {{{ */ { HashTable **table; HashPosition position; @@ -1355,7 +1355,7 @@ PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase(zend_ulong id TSRMLS_DC) /* return phpdbg_find_breakbase_ex(id, &table, &position TSRMLS_CC); } /* }}} */ -PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase_ex(zend_ulong id, HashTable ***table, HashPosition *position TSRMLS_DC) /* {{{ */ +PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase_ex(php_uint_t id, HashTable ***table, HashPosition *position TSRMLS_DC) /* {{{ */ { if (zend_hash_index_find(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP], id, (void**)table) == SUCCESS) { phpdbg_breakbase_t *brake; @@ -1372,7 +1372,7 @@ PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase_ex(zend_ulong id, HashTable return NULL; } /* }}} */ -PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ +PHPDBG_API void phpdbg_print_breakpoints(php_uint_t type TSRMLS_DC) /* {{{ */ { switch (type) { case PHPDBG_BREAK_SYM: if ((PHPDBG_G(flags) & PHPDBG_HAS_SYM_BP)) { @@ -1474,7 +1474,7 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashTable *class_table, *method_table; char *class_name = NULL, *method_name = NULL; php_size_t class_len = 0, method_len = 0; - php_uint_t class_idx = Z_I(0), method_idx = Z_I(0); + php_uint_t class_idx = Z_UI(0), method_idx = Z_UI(0); phpdbg_writeln(SEPARATE); phpdbg_writeln("Method opline Breakpoints:"); diff --git a/sapi/phpdbg/phpdbg_bp.h b/sapi/phpdbg/phpdbg_bp.h index ed1b413..002307c 100644 --- a/sapi/phpdbg/phpdbg_bp.h +++ b/sapi/phpdbg/phpdbg_bp.h @@ -28,7 +28,7 @@ typedef struct _zend_op *phpdbg_opline_ptr_t; /* }}} */ #define phpdbg_breakbase(name) \ int id; \ zend_uchar type; \ - zend_ulong hits; \ + php_uint_t hits; \ zend_bool disabled; \ const char *name /* }}} */ @@ -42,7 +42,7 @@ typedef struct _phpdbg_breakbase_t { */ typedef struct _phpdbg_breakfile_t { phpdbg_breakbase(filename); - long line; + php_int_t line; } phpdbg_breakfile_t; /** @@ -70,8 +70,8 @@ typedef struct _phpdbg_breakopline_t { size_t func_len; const char *class_name; size_t class_len; - zend_ulong opline_num; - zend_ulong opline; + php_uint_t opline_num; + php_uint_t opline; } phpdbg_breakopline_t; /** @@ -79,7 +79,7 @@ typedef struct _phpdbg_breakopline_t { */ typedef struct _phpdbg_breakline_t { phpdbg_breakbase(name); - zend_ulong opline; + php_uint_t opline; phpdbg_breakopline_t *base; } phpdbg_breakline_t; @@ -88,7 +88,7 @@ typedef struct _phpdbg_breakline_t { */ typedef struct _phpdbg_breakop_t { phpdbg_breakbase(name); - zend_ulong hash; + php_uint_t hash; } phpdbg_breakop_t; /** @@ -99,7 +99,7 @@ typedef struct _phpdbg_breakcond_t { size_t code_len; zend_bool paramed; phpdbg_param_t param; - zend_ulong hash; + php_uint_t hash; zend_op_array *ops; } phpdbg_breakcond_t; @@ -109,15 +109,15 @@ PHPDBG_API int phpdbg_resolve_op_array_break(phpdbg_breakopline_t *brake, zend_o PHPDBG_API int phpdbg_resolve_opline_break(phpdbg_breakopline_t *new_break TSRMLS_DC); /* }}} */ /* {{{ Breakpoint Creation API */ -PHPDBG_API void phpdbg_set_breakpoint_file(const char* filename, long lineno TSRMLS_DC); +PHPDBG_API void phpdbg_set_breakpoint_file(const char* filename, php_int_t lineno TSRMLS_DC); PHPDBG_API void phpdbg_set_breakpoint_symbol(const char* func_name, size_t func_name_len TSRMLS_DC); PHPDBG_API void phpdbg_set_breakpoint_method(const char* class_name, const char* func_name TSRMLS_DC); PHPDBG_API void phpdbg_set_breakpoint_opcode(const char* opname, size_t opname_len TSRMLS_DC); -PHPDBG_API void phpdbg_set_breakpoint_opline(zend_ulong opline TSRMLS_DC); +PHPDBG_API void phpdbg_set_breakpoint_opline(php_uint_t opline TSRMLS_DC); PHPDBG_API void phpdbg_set_breakpoint_opline_ex(phpdbg_opline_ptr_t opline TSRMLS_DC); -PHPDBG_API void phpdbg_set_breakpoint_method_opline(const char *class, const char *method, zend_ulong opline TSRMLS_DC); -PHPDBG_API void phpdbg_set_breakpoint_function_opline(const char *function, zend_ulong opline TSRMLS_DC); -PHPDBG_API void phpdbg_set_breakpoint_file_opline(const char *file, zend_ulong opline TSRMLS_DC); +PHPDBG_API void phpdbg_set_breakpoint_method_opline(const char *class, const char *method, php_uint_t opline TSRMLS_DC); +PHPDBG_API void phpdbg_set_breakpoint_function_opline(const char *function, php_uint_t opline TSRMLS_DC); +PHPDBG_API void phpdbg_set_breakpoint_file_opline(const char *file, php_uint_t opline TSRMLS_DC); PHPDBG_API void phpdbg_set_breakpoint_expression(const char* expression, size_t expression_len TSRMLS_DC); PHPDBG_API void phpdbg_set_breakpoint_at(const phpdbg_param_t *param, const phpdbg_input_t *input TSRMLS_DC); /* }}} */ @@ -126,19 +126,19 @@ PHPDBG_API phpdbg_breakbase_t* phpdbg_find_breakpoint(zend_execute_data* TSRMLS_ /* {{{ Misc Breakpoint API */ PHPDBG_API void phpdbg_hit_breakpoint(phpdbg_breakbase_t* brake, zend_bool output TSRMLS_DC); -PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC); +PHPDBG_API void phpdbg_print_breakpoints(php_uint_t type TSRMLS_DC); PHPDBG_API void phpdbg_print_breakpoint(phpdbg_breakbase_t* brake TSRMLS_DC); PHPDBG_API void phpdbg_reset_breakpoints(TSRMLS_D); PHPDBG_API void phpdbg_clear_breakpoints(TSRMLS_D); -PHPDBG_API void phpdbg_delete_breakpoint(zend_ulong num TSRMLS_DC); +PHPDBG_API void phpdbg_delete_breakpoint(php_uint_t num TSRMLS_DC); PHPDBG_API void phpdbg_enable_breakpoints(TSRMLS_D); -PHPDBG_API void phpdbg_enable_breakpoint(zend_ulong id TSRMLS_DC); -PHPDBG_API void phpdbg_disable_breakpoint(zend_ulong id TSRMLS_DC); +PHPDBG_API void phpdbg_enable_breakpoint(php_uint_t id TSRMLS_DC); +PHPDBG_API void phpdbg_disable_breakpoint(php_uint_t id TSRMLS_DC); PHPDBG_API void phpdbg_disable_breakpoints(TSRMLS_D); /* }}} */ /* {{{ Breakbase API */ -PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase(zend_ulong id TSRMLS_DC); -PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase_ex(zend_ulong id, HashTable ***table, HashPosition *position TSRMLS_DC); /* }}} */ +PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase(php_uint_t id TSRMLS_DC); +PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakbase_ex(php_uint_t id, HashTable ***table, HashPosition *position TSRMLS_DC); /* }}} */ /* {{{ Breakpoint Exportation API */ PHPDBG_API void phpdbg_export_breakpoints(FILE *handle TSRMLS_DC); /* }}} */ diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index 9f052d6..fb92c91 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -249,9 +249,9 @@ PHPDBG_API void phpdbg_copy_param(const phpdbg_param_t* src, phpdbg_param_t* des } } /* }}} */ -PHPDBG_API zend_ulong phpdbg_hash_param(const phpdbg_param_t *param TSRMLS_DC) /* {{{ */ +PHPDBG_API php_uint_t phpdbg_hash_param(const phpdbg_param_t *param TSRMLS_DC) /* {{{ */ { - zend_ulong hash = param->type; + php_uint_t hash = param->type; switch (param->type) { case STR_PARAM: diff --git a/sapi/phpdbg/phpdbg_cmd.h b/sapi/phpdbg/phpdbg_cmd.h index e779fd4..2acf295 100644 --- a/sapi/phpdbg/phpdbg_cmd.h +++ b/sapi/phpdbg/phpdbg_cmd.h @@ -55,11 +55,11 @@ struct _phpdbg_input_t { typedef struct _phpdbg_param { phpdbg_param_type type; - long num; - zend_ulong addr; + php_int_t num; + php_uint_t addr; struct { char *name; - long line; + php_int_t line; } file; struct { char *class; @@ -90,7 +90,7 @@ struct _phpdbg_command_t { #define PHPDBG_EX(v) (EG(current_execute_data)->v) typedef struct { - int num; + php_int_t num; zend_execute_data *execute_data; } phpdbg_frame_t; /* }}} */ @@ -132,7 +132,7 @@ PHPDBG_API phpdbg_param_type phpdbg_parse_param(const char*, size_t, phpdbg_para PHPDBG_API void phpdbg_clear_param(phpdbg_param_t* TSRMLS_DC); PHPDBG_API void phpdbg_copy_param(const phpdbg_param_t*, phpdbg_param_t* TSRMLS_DC); PHPDBG_API zend_bool phpdbg_match_param(const phpdbg_param_t *, const phpdbg_param_t * TSRMLS_DC); -PHPDBG_API zend_ulong phpdbg_hash_param(const phpdbg_param_t * TSRMLS_DC); +PHPDBG_API php_uint_t phpdbg_hash_param(const phpdbg_param_t * TSRMLS_DC); PHPDBG_API const char* phpdbg_get_param_type(const phpdbg_param_t* TSRMLS_DC); PHPDBG_API char* phpdbg_param_tostring(const phpdbg_param_t *param, char **pointer TSRMLS_DC); diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index 272b30f..d852414 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -46,13 +46,13 @@ void phpdbg_restore_frame(TSRMLS_D) /* {{{ */ EG(called_scope) = PHPDBG_EX(current_called_scope); } /* }}} */ -void phpdbg_switch_frame(int frame TSRMLS_DC) /* {{{ */ +void phpdbg_switch_frame(php_int_t frame TSRMLS_DC) /* {{{ */ { zend_execute_data *execute_data = PHPDBG_FRAME(num)?PHPDBG_FRAME(execute_data):EG(current_execute_data); - int i = 0; + php_int_t i = 0; if (PHPDBG_FRAME(num) == frame) { - phpdbg_notice("Already in frame #%d", frame); + phpdbg_notice("Already in frame #%pd", frame); return; } @@ -67,7 +67,7 @@ void phpdbg_switch_frame(int frame TSRMLS_DC) /* {{{ */ } if (execute_data == NULL) { - phpdbg_error("No frame #%d", frame); + phpdbg_error("No frame #%pd", frame); return; } @@ -186,14 +186,14 @@ void phpdbg_dump_backtrace(size_t num TSRMLS_DC) /* {{{ */ if (zend_hash_get_current_data_ex(Z_ARRVAL(zbacktrace), (void**)&tmp, &position) == FAILURE) { - phpdbg_write("frame #0: {main} at %s:%ld", Z_STRVAL_PP(file), Z_IVAL_PP(line)); + phpdbg_write("frame #0: {main} at %s:%pd", Z_STRVAL_PP(file), Z_IVAL_PP(line)); break; } if (user_defined == SUCCESS) { phpdbg_write("frame #%d: ", i++); phpdbg_dump_prototype(tmp TSRMLS_CC); - phpdbg_writeln(" at %s:%ld", Z_STRVAL_PP(file), Z_IVAL_PP(line)); + phpdbg_writeln(" at %s:%pd", Z_STRVAL_PP(file), Z_IVAL_PP(line)); } else { phpdbg_write(" => "); phpdbg_dump_prototype(tmp TSRMLS_CC); diff --git a/sapi/phpdbg/phpdbg_frame.h b/sapi/phpdbg/phpdbg_frame.h index fbccd54..61109a3 100644 --- a/sapi/phpdbg/phpdbg_frame.h +++ b/sapi/phpdbg/phpdbg_frame.h @@ -24,7 +24,7 @@ #include "TSRM.h" void phpdbg_restore_frame(TSRMLS_D); -void phpdbg_switch_frame(int TSRMLS_DC); +void phpdbg_switch_frame(php_int_t TSRMLS_DC); void phpdbg_dump_backtrace(size_t TSRMLS_DC); #endif /* PHPDBG_FRAME_H */ diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index b49be85..ac0cfb3 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -130,10 +130,10 @@ PHPDBG_LIST(class) /* {{{ */ return SUCCESS; } /* }}} */ -void phpdbg_list_file(const char *filename, long count, long offset, int highlight TSRMLS_DC) /* {{{ */ +void phpdbg_list_file(const char *filename, php_int_t count, php_int_t offset, int highlight TSRMLS_DC) /* {{{ */ { unsigned char *mem, *pos, *last_pos, *end_pos; - struct stat st; + zend_stat_t st; #ifndef _WIN32 int fd; #else diff --git a/sapi/phpdbg/phpdbg_list.h b/sapi/phpdbg/phpdbg_list.h index d618027..d96f1d5 100644 --- a/sapi/phpdbg/phpdbg_list.h +++ b/sapi/phpdbg/phpdbg_list.h @@ -34,7 +34,7 @@ PHPDBG_LIST(func); void phpdbg_list_function_byname(const char *, size_t TSRMLS_DC); void phpdbg_list_function(const zend_function* TSRMLS_DC); -void phpdbg_list_file(const char*, long, long, int TSRMLS_DC); +void phpdbg_list_file(const char*, php_int_t, php_int_t, int TSRMLS_DC); static const phpdbg_command_t phpdbg_list_commands[] = { PHPDBG_COMMAND_D_EX(lines, "lists the specified lines", 'l', list_lines, NULL, 1), diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 394596c..edc3eef 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -135,7 +135,7 @@ static inline int phpdbg_call_register(phpdbg_input_t *input TSRMLS_DC) /* {{{ * void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_init TSRMLS_DC) /* {{{ */ { - struct stat sb; + zend_stat_t sb; if (init_file && VCWD_STAT(init_file, &sb) != -1) { FILE *fp = fopen(init_file, "r"); @@ -266,7 +266,7 @@ PHPDBG_COMMAND(exec) /* {{{ */ { switch (param->type) { case STR_PARAM: { - struct stat sb; + zend_stat_t sb; if (VCWD_STAT(param->str, &sb) != FAILURE) { if (sb.st_mode & (S_IFREG|S_IFLNK)) { @@ -805,7 +805,7 @@ PHPDBG_COMMAND(source) /* {{{ */ "Incorrect usage of source command, see help"); } } else { - struct stat sb; + zend_stat_t sb; if (VCWD_STAT(param->str, &sb) != -1) { phpdbg_try_file_init(param->str, param->len, 0 TSRMLS_CC); } else phpdbg_error("Cannot stat %s", param->str);
« previous php.cvs (#75458) next »