summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_watch.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-25 19:24:55 +0200
committerAnatol Belski <ab@php.net>2014-08-25 19:24:55 +0200
commitc3e3c98ec666812daaaca896cf5ef758a8a6df14 (patch)
treed82a76de5c8d117d1cf2dcca19bb30a283621870 /sapi/phpdbg/phpdbg_watch.c
parent0cf2dbdf58645b52cb6582b1b2571c5cd9e9e6b3 (diff)
downloadphp-git-c3e3c98ec666812daaaca896cf5ef758a8a6df14.tar.gz
master renames phase 1
Diffstat (limited to 'sapi/phpdbg/phpdbg_watch.c')
-rw-r--r--sapi/phpdbg/phpdbg_watch.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c
index 10834fa9a6..e88622444b 100644
--- a/sapi/phpdbg/phpdbg_watch.c
+++ b/sapi/phpdbg/phpdbg_watch.c
@@ -182,11 +182,11 @@ static int phpdbg_create_recursive_watchpoint(phpdbg_watchpoint_t *watch TSRMLS_
zend_hash_get_current_key_zval_ex(ht, &key, &position);
if (Z_TYPE(key) == IS_STRING) {
- new_watch->name_in_parent = zend_strndup(Z_STRVAL(key), Z_STRSIZE(key));
- new_watch->name_in_parent_len = Z_STRSIZE(key);
+ new_watch->name_in_parent = zend_strndup(Z_STRVAL(key), Z_STRLEN(key));
+ new_watch->name_in_parent_len = Z_STRLEN(key);
} else {
new_watch->name_in_parent = NULL;
- new_watch->name_in_parent_len = asprintf(&new_watch->name_in_parent, "%ld", Z_IVAL(key));
+ new_watch->name_in_parent_len = asprintf(&new_watch->name_in_parent, "%ld", Z_LVAL(key));
}
new_watch->str = NULL;
@@ -238,7 +238,7 @@ static int phpdbg_delete_watchpoint_recursive(phpdbg_watchpoint_t *watch, zend_b
if (Z_TYPE(key) == IS_STRING) {
str_len = asprintf(&str, "%.*s%s%s%s", (int)watch->parent->str_len, watch->parent->str, Z_TYPE_P(watch->parent->addr.zv) == IS_ARRAY?"[":"->", phpdbg_get_property_key(Z_STRVAL(key)), Z_TYPE_P(watch->parent->addr.zv) == IS_ARRAY?"]":"");
} else {
- str_len = asprintf(&str, "%.*s%s%li%s", (int)watch->parent->str_len, watch->parent->str, Z_TYPE_P(watch->parent->addr.zv) == IS_ARRAY?"[":"->", Z_IVAL(key), Z_TYPE_P(watch->parent->addr.zv) == IS_ARRAY?"]":"");
+ str_len = asprintf(&str, "%.*s%s%li%s", (int)watch->parent->str_len, watch->parent->str, Z_TYPE_P(watch->parent->addr.zv) == IS_ARRAY?"[":"->", Z_LVAL(key), Z_TYPE_P(watch->parent->addr.zv) == IS_ARRAY?"]":"");
}
if (zend_hash_find(&PHPDBG_G(watchpoints), str, str_len, (void **) &watchpoint) == SUCCESS) {
@@ -338,7 +338,7 @@ static int phpdbg_watchpoint_parse_input(char *input, size_t len, HashTable *par
watch->flags = 0;
zend_hash_get_current_key_zval_ex(parent, key, &position);
convert_to_string(key);
- watch->str = malloc(i + Z_STRSIZE_P(key) + 2);
+ watch->str = malloc(i + Z_STRLEN_P(key) + 2);
watch->str_len = sprintf(watch->str, "%.*s%s%s", (int)i, input, phpdbg_get_property_key(Z_STRVAL_P(key)), input[len - 1] == ']'?"]":"");
efree(key);
watch->name_in_parent = zend_strndup(last_index, index_len);