com php-src: Always lowercase function names for lookup in phpdbg -p: sapi/phpdbg/phpdbg_print.c
| From: | Bob Weinand | Date: | Wed, 22 Jul 2015 13:33:44 +0000 |
| Subject: | com php-src: Always lowercase function names for lookup in phpdbg -p: sapi/phpdbg/phpdbg_print.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88115@lists.php.net to get a copy of this message | ||
Commit: d6415ae47344207efc0fff762e55f596cddd1154
Author: Bob Weinand <bobwei9@hotmail.com> Wed, 22 Jul 2015 15:33:44 +0200
Parents: 264bed40a75e78e263a9999bd3d39bd09f2865c3
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d6415ae47344207efc0fff762e55f596cddd1154
Log:
Always lowercase function names for lookup in phpdbg -p
Changed paths:
M sapi/phpdbg/phpdbg_print.c
Diff:
diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c
index 5e485b3..ccf5611 100644
--- a/sapi/phpdbg/phpdbg_print.c
+++ b/sapi/phpdbg/phpdbg_print.c
@@ -400,14 +400,20 @@ PHPDBG_API void phpdbg_print_opcodes(char *function)
phpdbg_print_opcodes_ce(ce);
}
} ZEND_HASH_FOREACH_END();
- } else if (strstr(function, "::") == NULL) {
- phpdbg_print_opcodes_function(function, strlen(function));
} else {
- char *method_name, *class_name = strtok(function, "::");
- if ((method_name = strtok(NULL, "::")) == NULL) {
- phpdbg_print_opcodes_class(class_name);
+ function = zend_str_tolower_dup(function, strlen(function));
+
+ if (strstr(function, "::") == NULL) {
+ phpdbg_print_opcodes_function(function, strlen(function));
} else {
- phpdbg_print_opcodes_method(class_name, method_name);
+ char *method_name, *class_name = strtok(function, "::");
+ if ((method_name = strtok(NULL, "::")) == NULL) {
+ phpdbg_print_opcodes_class(class_name);
+ } else {
+ phpdbg_print_opcodes_method(class_name, method_name);
+ }
}
+
+ efree(function);
}
}