com php-src: Fixed printing: sapi/phpdbg/phpdbg.c sapi/phpdbg/p hpdbg_info.c sapi/phpdbg/phpdbg_list.c sapi/phpdbg/ phpdbg_prompt.c
| From: | Xinchen Hui | Date: | Thu, 27 Aug 2015 03:38:11 +0000 |
| Subject: | com php-src: Fixed printing: sapi/phpdbg/phpdbg.c sapi/phpdbg/p hpdbg_info.c sapi/phpdbg/phpdbg_list.c sapi/phpdbg/ phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88777@lists.php.net to get a copy of this message | ||
Commit: c359ca8c3dea661cc2faa95270f59469ee8ee9d0
Author: Xinchen Hui <laruence@php.net> Thu, 27 Aug 2015 11:34:52 +0800
Parents: b795ce6de54b303c51b3d6f6437ed981afd9fd57
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c359ca8c3dea661cc2faa95270f59469ee8ee9d0
Log:
Fixed printing
Changed paths:
M sapi/phpdbg/phpdbg.c
M sapi/phpdbg/phpdbg_info.c
M sapi/phpdbg/phpdbg_list.c
M sapi/phpdbg/phpdbg_prompt.c
Diff:
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 8a22ea2..08fb029 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -292,11 +292,11 @@ static PHP_FUNCTION(phpdbg_exec)
ZVAL_TRUE(return_value);
}
} else {
- zend_error(E_WARNING, "Failed to set execution context (%s), not a regular file or
symlink", exec);
+ zend_error(E_WARNING, "Failed to set execution context (%s), not a regular file or
symlink", ZSTR_VAL(exec));
ZVAL_FALSE(return_value);
}
} else {
- zend_error(E_WARNING, "Failed to set execution context (%s) the file does not exist",
exec);
+ zend_error(E_WARNING, "Failed to set execution context (%s) the file does not exist",
ZSTR_VAL(exec));
ZVAL_FALSE(return_value);
}
diff --git a/sapi/phpdbg/phpdbg_info.c b/sapi/phpdbg/phpdbg_info.c
index 51e12b7..f947dc4 100644
--- a/sapi/phpdbg/phpdbg_info.c
+++ b/sapi/phpdbg/phpdbg_info.c
@@ -72,7 +72,7 @@ PHPDBG_INFO(files) /* {{{ */
phpdbg_try_access {
ZEND_HASH_FOREACH_STR_KEY(&EG(included_files), fname) {
- phpdbg_writeln("includedfile", "name=\"%s\"", "File:
%s", fname);
+ phpdbg_writeln("includedfile", "name=\"%s\"", "File:
%s", ZSTR_VAL(fname));
} ZEND_HASH_FOREACH_END();
} phpdbg_catch_access {
phpdbg_error("signalsegv", "", "Could not fetch file name, invalid data
source, aborting included file listing");
@@ -274,7 +274,7 @@ retry_switch:
#undef VARIABLEINFO
} phpdbg_catch_access {
- phpdbg_writeln("variable", "address=\"%p\"
name=\"%s\"", "%p\tn/a\tn/a\t$%s", data, var);
+ phpdbg_writeln("variable", "address=\"%p\"
name=\"%s\"", "%p\tn/a\tn/a\t$%s", data, ZSTR_VAL(var));
} phpdbg_end_try_access();
} ZEND_HASH_FOREACH_END();
}
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index 1a73a2c..a6f1f9a 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -111,10 +111,10 @@ PHPDBG_LIST(class) /* {{{ */
if (ce->info.user.filename) {
phpdbg_list_file(ce->info.user.filename, ce->info.user.line_end -
ce->info.user.line_start + 1, ce->info.user.line_start, 0);
} else {
- phpdbg_error("list", "type=\"nosource\" class=\"%s\"",
"The source of the requested class (%s) cannot be found", ce->name);
+ phpdbg_error("list", "type=\"nosource\" class=\"%s\"",
"The source of the requested class (%s) cannot be found", ZSTR_VAL(ce->name));
}
} else {
- phpdbg_error("list", "type=\"internalclass\"
class=\"%s\"", "The class requested (%s) is not user defined",
ce->name);
+ phpdbg_error("list", "type=\"internalclass\"
class=\"%s\"", "The class requested (%s) is not user defined",
ZSTR_VAL(ce->name));
}
} else {
phpdbg_error("list", "type=\"notfound\" class=\"%s\"",
"The requested class (%s) could not be found", param->str);
@@ -152,7 +152,7 @@ void phpdbg_list_file(zend_string *filename, uint count, int offset, uint highli
lastline = data->lines;
}
- phpdbg_xml("<list %r file=\"%s\">", filename);
+ phpdbg_xml("<list %r file=\"%s\">", ZSTR_VAL(filename));
for (line = offset; line < lastline;) {
uint linestart = data->line[line++];
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 5d5ed28..41d221f 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -1629,7 +1629,7 @@ void phpdbg_force_interruption(void) /* {{{ */ {
if (data) {
if (data->func) {
if (ZEND_USER_CODE(data->func->type)) {
- phpdbg_notice("hardinterrupt", "opline=\"%p\" num=\"%lu\"
file=\"%s\" line=\"%u\"", "Current opline: %p (op #%lu) in
%s:%u", data->opline, (data->opline - data->func->op_array.opcodes) /
sizeof(data->opline), data->func->op_array.filename, data->opline->lineno);
+ phpdbg_notice("hardinterrupt", "opline=\"%p\" num=\"%lu\"
file=\"%s\" line=\"%u\"", "Current opline: %p (op #%lu) in
%s:%u", data->opline, (data->opline - data->func->op_array.opcodes) /
sizeof(data->opline), data->func->op_array.filename->val, data->opline->lineno);
} else if (data->func->internal_function.function_name) {
phpdbg_notice("hardinterrupt", "func=\"%s\"", "Current
opline: in internal function %s", data->func->internal_function.function_name->val);
} else {