[php-src] master: phpdbg: use ZSTR_VAL() instead of direct zend_string member access (#25703)
| From: | Alexander Danilov via GitHub | Date: | Tue, 24 Nov 2026 11:29:31 +0000 |
| Subject: | [php-src] master: phpdbg: use ZSTR_VAL() instead of direct zend_string member access (#25703) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-144093@lists.php.net to get a copy of this message | ||
Author: Alexander Danilov (adapik)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-11-24T11:29:27Z
Commit: https://github.com/php/php-src/commit/f4be138bdd94e3f1b69a1f1211ea549cd0db9b59
Raw diff: https://github.com/php/php-src/commit/f4be138bdd94e3f1b69a1f1211ea549cd0db9b59.diff
phpdbg: use ZSTR_VAL() instead of direct zend_string member access (#25703)
Changed paths:
M sapi/phpdbg/phpdbg_info.c
M sapi/phpdbg/phpdbg_print.c
M sapi/phpdbg/phpdbg_prompt.c
Diff:
diff --git a/sapi/phpdbg/phpdbg_info.c b/sapi/phpdbg/phpdbg_info.c
index 306293993f32..afda62d93171 100644
--- a/sapi/phpdbg/phpdbg_info.c
+++ b/sapi/phpdbg/phpdbg_info.c
@@ -210,7 +210,7 @@ static int phpdbg_print_symbols(bool show_globals) {
if (ops->function_name) {
if (ops->scope) {
- phpdbg_notice("Variables in %s::%s() (%d)", ops->scope->name->val,
ops->function_name->val, zend_hash_num_elements(&vars));
+ phpdbg_notice("Variables in %s::%s() (%d)", ZSTR_VAL(ops->scope->name),
ZSTR_VAL(ops->function_name), zend_hash_num_elements(&vars));
} else {
phpdbg_notice("Variables in %s() (%d)", ZSTR_VAL(ops->function_name),
zend_hash_num_elements(&vars));
}
@@ -309,9 +309,9 @@ PHPDBG_INFO(literal) /* {{{ */
if (ops->function_name) {
if (ops->scope) {
- phpdbg_notice("Literal Constants in %s::%s() (%d)", ops->scope->name->val,
ops->function_name->val, count);
+ phpdbg_notice("Literal Constants in %s::%s() (%d)", ZSTR_VAL(ops->scope->name),
ZSTR_VAL(ops->function_name), count);
} else {
- phpdbg_notice("Literal Constants in %s() (%d)", ops->function_name->val,
count);
+ phpdbg_notice("Literal Constants in %s() (%d)", ZSTR_VAL(ops->function_name),
count);
}
} else {
if (ops->filename) {
diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c
index c931c73eebc6..09e0b59413fc 100644
--- a/sapi/phpdbg/phpdbg_print.c
+++ b/sapi/phpdbg/phpdbg_print.c
@@ -235,7 +235,7 @@ static void phpdbg_print_opcodes_method_ce(zend_class_entry *ce, const char *fun
zend_function *func;
if (ce->type != ZEND_USER_CLASS) {
- phpdbg_out("function name: %s::%s (internal)\n", ce->name->val, function);
+ phpdbg_out("function name: %s::%s (internal)\n", ZSTR_VAL(ce->name), function);
return;
}
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index fe8502da47e9..2408da394568 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -1831,11 +1831,11 @@ void phpdbg_force_interruption(void) /* {{{ */ {
phpdbg_notice("Current opline: %p (op #%u) in %s:%u",
data->opline,
(uint32_t) (data->opline - data->func->op_array.opcodes),
- data->func->op_array.filename->val,
+ ZSTR_VAL(data->func->op_array.filename),
data->opline->lineno);
} else if (data->func->internal_function.function_name) {
phpdbg_notice("Current opline: in internal function %s",
- data->func->internal_function.function_name->val);
+ ZSTR_VAL(data->func->internal_function.function_name));
} else {
phpdbg_notice("Current opline: executing internal code");
}