From 5ae8f624a1cb3929b567cc47c634297b1a3e7915 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 24 Dec 2013 02:37:12 -0800 Subject: basic fixes to sapi/phpdbg --- sapi/phpdbg/phpdbg_bp.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'sapi/phpdbg/phpdbg_bp.c') diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index 69e0fa7086..0c1955c3e4 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; - zend_ulong id = 0L; + php_uint_t id = Z_I(0); if (zend_hash_num_elements(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP])) { phpdbg_notice( @@ -715,12 +715,12 @@ static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, co new_break.code = estrndup(expr, expr_len); new_break.code_len = expr_len; - Z_STRLEN(pv) = expr_len + sizeof("return ;") - 1; - Z_STRVAL(pv) = emalloc(Z_STRLEN(pv) + 1); + Z_STRSIZE(pv) = expr_len + sizeof("return ;") - 1; + Z_STRVAL(pv) = emalloc(Z_STRSIZE(pv) + 1); memcpy(Z_STRVAL(pv), "return ", sizeof("return ") - 1); memcpy(Z_STRVAL(pv) + sizeof("return ") - 1, expr, expr_len); - Z_STRVAL(pv)[Z_STRLEN(pv) - 1] = ';'; - Z_STRVAL(pv)[Z_STRLEN(pv)] = '\0'; + Z_STRVAL(pv)[Z_STRSIZE(pv) - 1] = ';'; + Z_STRVAL(pv)[Z_STRSIZE(pv)] = '\0'; Z_TYPE(pv) = IS_STRING; new_break.ops = zend_compile_string( @@ -1116,8 +1116,8 @@ PHPDBG_API void phpdbg_delete_breakpoint(zend_ulong num TSRMLS_DC) /* {{{ */ if ((brake = phpdbg_find_breakbase_ex(num, &table, &position TSRMLS_CC))) { char *key; - zend_uint klen; - zend_ulong idx; + php_size_t klen; + php_uint_t idx; int type = brake->type; char *name = NULL; size_t name_len = 0L; @@ -1394,8 +1394,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position[2]; HashTable *class_table; char *class_name = NULL; - zend_uint class_len = 0; - zend_ulong class_idx = 0L; + php_size_t class_len = 0; + php_uint_t class_idx = 0L; phpdbg_writeln(SEPARATE); phpdbg_writeln("Method Breakpoints:"); @@ -1473,8 +1473,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position[3]; HashTable *class_table, *method_table; char *class_name = NULL, *method_name = NULL; - zend_uint class_len = 0, method_len = 0; - zend_ulong class_idx = 0L, method_idx = 0L; + php_size_t class_len = 0, method_len = 0; + php_uint_t class_idx = Z_I(0), method_idx = Z_I(0); phpdbg_writeln(SEPARATE); phpdbg_writeln("Method opline Breakpoints:"); @@ -1512,8 +1512,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position[2]; HashTable *function_table; char *function_name = NULL; - zend_uint function_len = 0; - zend_ulong function_idx = 0L; + php_size_t function_len = 0; + php_uint_t function_idx = 0L; phpdbg_writeln(SEPARATE); phpdbg_writeln("Function opline Breakpoints:"); @@ -1542,8 +1542,8 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position[2]; HashTable *file_table; char *file_name = NULL; - zend_uint file_len = 0; - zend_ulong file_idx = 0L; + php_size_t file_len = 0; + php_uint_t file_idx = 0L; phpdbg_writeln(SEPARATE); phpdbg_writeln("File opline Breakpoints:"); -- cgit v1.2.1 From 0493099786b6135f1fe2f5de763f1edc61428303 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 24 Dec 2013 21:59:44 +0100 Subject: next wave on fixes for ext/phpdbg --- sapi/phpdbg/phpdbg_bp.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'sapi/phpdbg/phpdbg_bp.c') diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index 0c1955c3e4..1bd05cf656 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:"); -- cgit v1.2.1 From 63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Tue, 19 Aug 2014 08:07:31 +0200 Subject: basic macro replacements, all at once --- sapi/phpdbg/phpdbg_bp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sapi/phpdbg/phpdbg_bp.c') diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index a18316a228..35273554f8 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -721,12 +721,12 @@ static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, co new_break.code = estrndup(expr, expr_len); new_break.code_len = expr_len; - Z_STRLEN(pv) = expr_len + sizeof("return ;") - 1; - Z_STRVAL(pv) = emalloc(Z_STRLEN(pv) + 1); + Z_STRSIZE(pv) = expr_len + sizeof("return ;") - 1; + Z_STRVAL(pv) = emalloc(Z_STRSIZE(pv) + 1); memcpy(Z_STRVAL(pv), "return ", sizeof("return ") - 1); memcpy(Z_STRVAL(pv) + sizeof("return ") - 1, expr, expr_len); - Z_STRVAL(pv)[Z_STRLEN(pv) - 1] = ';'; - Z_STRVAL(pv)[Z_STRLEN(pv)] = '\0'; + Z_STRVAL(pv)[Z_STRSIZE(pv) - 1] = ';'; + Z_STRVAL(pv)[Z_STRSIZE(pv)] = '\0'; Z_TYPE(pv) = IS_STRING; new_break.ops = zend_compile_string( -- cgit v1.2.1 From c3e3c98ec666812daaaca896cf5ef758a8a6df14 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 19:24:55 +0200 Subject: master renames phase 1 --- sapi/phpdbg/phpdbg_bp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sapi/phpdbg/phpdbg_bp.c') diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index 35273554f8..a18316a228 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -721,12 +721,12 @@ static inline void phpdbg_create_conditional_break(phpdbg_breakcond_t *brake, co new_break.code = estrndup(expr, expr_len); new_break.code_len = expr_len; - Z_STRSIZE(pv) = expr_len + sizeof("return ;") - 1; - Z_STRVAL(pv) = emalloc(Z_STRSIZE(pv) + 1); + Z_STRLEN(pv) = expr_len + sizeof("return ;") - 1; + Z_STRVAL(pv) = emalloc(Z_STRLEN(pv) + 1); memcpy(Z_STRVAL(pv), "return ", sizeof("return ") - 1); memcpy(Z_STRVAL(pv) + sizeof("return ") - 1, expr, expr_len); - Z_STRVAL(pv)[Z_STRSIZE(pv) - 1] = ';'; - Z_STRVAL(pv)[Z_STRSIZE(pv)] = '\0'; + Z_STRVAL(pv)[Z_STRLEN(pv) - 1] = ';'; + Z_STRVAL(pv)[Z_STRLEN(pv)] = '\0'; Z_TYPE(pv) = IS_STRING; new_break.ops = zend_compile_string( -- cgit v1.2.1 From 6f9f0bf2056f0dc17d9bcc6dd3b7d28ac878c6fc Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Mon, 25 Aug 2014 19:28:33 +0200 Subject: master renames phase 2 --- sapi/phpdbg/phpdbg_bp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sapi/phpdbg/phpdbg_bp.c') diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index a18316a228..86f32b092e 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -700,7 +700,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) /* {{{ */ { phpdbg_breakcond_t new_break; - zend_uint cops = CG(compiler_options); + uint32_t cops = CG(compiler_options); zval pv; PHPDBG_BREAK_INIT(new_break, PHPDBG_BREAK_COND); @@ -1092,7 +1092,7 @@ PHPDBG_API void phpdbg_delete_breakpoint(zend_ulong num TSRMLS_DC) /* {{{ */ if ((brake = phpdbg_find_breakbase_ex(num, &table, &position TSRMLS_CC))) { char *key; - zend_uint klen; + uint32_t klen; zend_ulong idx; int type = brake->type; char *name = NULL; @@ -1370,7 +1370,7 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position[2]; HashTable *class_table; char *class_name = NULL; - zend_uint class_len = 0; + uint32_t class_len = 0; zend_ulong class_idx = 0L; phpdbg_writeln(SEPARATE); @@ -1449,7 +1449,7 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position[3]; HashTable *class_table, *method_table; char *class_name = NULL, *method_name = NULL; - zend_uint class_len = 0, method_len = 0; + uint32_t class_len = 0, method_len = 0; zend_ulong class_idx = 0L, method_idx = 0L; phpdbg_writeln(SEPARATE); @@ -1488,7 +1488,7 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position[2]; HashTable *function_table; char *function_name = NULL; - zend_uint function_len = 0; + uint32_t function_len = 0; zend_ulong function_idx = 0L; phpdbg_writeln(SEPARATE); @@ -1518,7 +1518,7 @@ PHPDBG_API void phpdbg_print_breakpoints(zend_ulong type TSRMLS_DC) /* {{{ */ HashPosition position[2]; HashTable *file_table; char *file_name = NULL; - zend_uint file_len = 0; + uint32_t file_len = 0; zend_ulong file_idx = 0L; phpdbg_writeln(SEPARATE); -- cgit v1.2.1 From 59848e3fbbcab3144c4d711df5d5be39cca51269 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 25 Aug 2014 23:45:02 +0200 Subject: Remove ZEND_ACC_INTERACTIVE and CG(interactive) As far as I can discern these are leftovers of the interactive shell implementation that was used before PHP 5.4. Now the readline ext makes use of normal eval calls for this. So, dropping these until there is evidence to the contrary, as they currently wouldn't work anyway. --- sapi/phpdbg/phpdbg_bp.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'sapi/phpdbg/phpdbg_bp.c') diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c index 86f32b092e..09bdc1931f 100644 --- a/sapi/phpdbg/phpdbg_bp.c +++ b/sapi/phpdbg/phpdbg_bp.c @@ -970,7 +970,6 @@ static inline phpdbg_breakbase_t *phpdbg_find_conditional_breakpoint(zend_execut zend_hash_get_current_data_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], (void*)&bp, &position) == SUCCESS; zend_hash_move_forward_ex(&PHPDBG_G(bp)[PHPDBG_BREAK_COND], &position)) { zval *retval = NULL; - int orig_interactive = CG(interactive); zval **orig_retval = EG(return_value_ptr_ptr); zend_op_array *orig_ops = EG(active_op_array); zend_op **orig_opline = EG(opline_ptr); @@ -995,8 +994,6 @@ static inline phpdbg_breakbase_t *phpdbg_find_conditional_breakpoint(zend_execut zend_rebuild_symbol_table(TSRMLS_C); } - CG(interactive) = 0; - zend_try { PHPDBG_G(flags) |= PHPDBG_IN_COND_BP; zend_execute(EG(active_op_array) TSRMLS_CC); @@ -1008,8 +1005,6 @@ static inline phpdbg_breakbase_t *phpdbg_find_conditional_breakpoint(zend_execut breakpoint = SUCCESS; } } zend_catch { - CG(interactive) = orig_interactive; - EG(no_extensions)=1; EG(return_value_ptr_ptr) = orig_retval; EG(active_op_array) = orig_ops; @@ -1017,8 +1012,6 @@ static inline phpdbg_breakbase_t *phpdbg_find_conditional_breakpoint(zend_execut PHPDBG_G(flags) &= ~PHPDBG_IN_COND_BP; } zend_end_try(); - CG(interactive) = orig_interactive; - EG(no_extensions)=1; EG(return_value_ptr_ptr) = orig_retval; EG(active_op_array) = orig_ops; -- cgit v1.2.1