summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index adb31d1e3c..acdae17ce3 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -207,7 +207,7 @@ static inline int phpdbg_call_register(phpdbg_param_t *stack) /* {{{ */
struct phpdbg_init_state {
int line;
- zend_bool in_code;
+ bool in_code;
char *code;
size_t code_len;
const char *init_file;
@@ -309,7 +309,7 @@ void phpdbg_string_init(char *buffer) {
}
}
-void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_init) /* {{{ */
+void phpdbg_try_file_init(char *init_file, size_t init_file_len, bool free_init) /* {{{ */
{
zend_stat_t sb;
@@ -340,7 +340,7 @@ void phpdbg_try_file_init(char *init_file, size_t init_file_len, zend_bool free_
}
} /* }}} */
-void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) /* {{{ */
+void phpdbg_init(char *init_file, size_t init_file_len, bool use_default) /* {{{ */
{
if (init_file) {
phpdbg_try_file_init(init_file, init_file_len, 1);
@@ -382,7 +382,7 @@ void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default) /
}
/* }}} */
-void phpdbg_clean(zend_bool full, zend_bool resubmit) /* {{{ */
+void phpdbg_clean(bool full, bool resubmit) /* {{{ */
{
/* this is implicitly required */
if (PHPDBG_G(ops)) {
@@ -566,7 +566,8 @@ int phpdbg_compile(void) /* {{{ */
return FAILURE;
}
- if (php_stream_open_for_zend_ex(PHPDBG_G(exec), &fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS && zend_stream_fixup(&fh, &buf, &len) == SUCCESS) {
+ zend_stream_init_filename(&fh, PHPDBG_G(exec));
+ if (php_stream_open_for_zend_ex(&fh, USE_PATH|STREAM_OPEN_FOR_INCLUDE) == SUCCESS && zend_stream_fixup(&fh, &buf, &len) == SUCCESS) {
CG(skip_shebang) = 1;
PHPDBG_G(ops) = zend_compile_file(&fh, ZEND_INCLUDE);
zend_destroy_file_handle(&fh);
@@ -581,7 +582,7 @@ int phpdbg_compile(void) /* {{{ */
} else {
phpdbg_error("compile", "type=\"openfailure\" context=\"%s\"", "Could not open file %s", PHPDBG_G(exec));
}
-
+ zend_destroy_file_handle(&fh);
return FAILURE;
} /* }}} */
@@ -751,7 +752,7 @@ PHPDBG_COMMAND(run) /* {{{ */
{
if (PHPDBG_G(ops) || PHPDBG_G(exec)) {
zend_execute_data *ex = EG(current_execute_data);
- zend_bool restore = 1;
+ bool restore = 1;
if (PHPDBG_G(in_execution)) {
if (phpdbg_ask_user_permission("Do you really want to restart execution?") == SUCCESS) {
@@ -947,7 +948,7 @@ int phpdbg_output_ev_variable(char *name, size_t len, char *keyname, size_t keyl
PHPDBG_COMMAND(ev) /* {{{ */
{
- zend_bool stepping = ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING) == PHPDBG_IS_STEPPING);
+ bool stepping = ((PHPDBG_G(flags) & PHPDBG_IS_STEPPING) == PHPDBG_IS_STEPPING);
zval retval;
zend_execute_data *original_execute_data = EG(current_execute_data);
@@ -1228,7 +1229,7 @@ static void add_zendext_info(zend_extension *ext) /* {{{ */ {
/* }}} */
#ifdef HAVE_LIBDL
-PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name) /* {{{ */ {
+PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, const char **name) /* {{{ */ {
DL_HANDLE handle;
char *extension_dir;
@@ -1326,7 +1327,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name)
}
module_entry = get_module();
- *name = (char *) module_entry->name;
+ *name = module_entry->name;
if (strcmp(ZEND_EXTENSION_BUILD_ID, module_entry->build_id)) {
phpdbg_error("dl", "type=\"wrongbuild\" module=\"%s\" buildneeded=\"%s\" buildinstalled=\"%s\"", "%s was built with configuration %s, whereas running engine is %s", module_entry->name, module_entry->build_id, ZEND_EXTENSION_BUILD_ID);
@@ -1372,8 +1373,8 @@ quit:
PHPDBG_COMMAND(dl) /* {{{ */
{
- const char *type;
- char *name, *path;
+ const char *type, *name;
+ char *path;
if (!param || param->type == EMPTY_PARAM) {
phpdbg_notice("dl", "extensiontype=\"Zend extension\"", "Zend extensions");
@@ -1389,7 +1390,6 @@ PHPDBG_COMMAND(dl) /* {{{ */
phpdbg_activate_err_buf(1);
if ((type = phpdbg_load_module_or_extension(&path, &name)) == NULL) {
phpdbg_error("dl", "path=\"%s\" %b", "Could not load %s, not found or invalid zend extension / module: %b", path);
- efree(name);
} else {
phpdbg_notice("dl", "extensiontype=\"%s\" name=\"%s\" path=\"%s\"", "Successfully loaded the %s %s at path %s", type, name, path);
}
@@ -1548,7 +1548,7 @@ PHPDBG_COMMAND(watch) /* {{{ */
return SUCCESS;
} /* }}} */
-int phpdbg_interactive(zend_bool allow_async_unsafe, char *input) /* {{{ */
+int phpdbg_interactive(bool allow_async_unsafe, char *input) /* {{{ */
{
int ret = SUCCESS;
phpdbg_param_t stack;
@@ -1681,7 +1681,7 @@ static inline void list_code() {
void phpdbg_execute_ex(zend_execute_data *execute_data) /* {{{ */
{
- zend_bool original_in_execution = PHPDBG_G(in_execution);
+ bool original_in_execution = PHPDBG_G(in_execution);
if ((PHPDBG_G(flags) & PHPDBG_IS_STOPPING) && !(PHPDBG_G(flags) & PHPDBG_IS_RUNNING)) {
zend_bailout();