diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-08-13 13:56:29 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-08-13 13:56:29 +0300 |
commit | 715d5d2855a0c6946ac99f1631a4dd9168b0cbfe (patch) | |
tree | cf5bf02178ec1946335c301c65a302311a4053ef /sapi/phpdbg/phpdbg_watch.c | |
parent | e5813fedf8c0b7309958d7ed471945d2dbf14998 (diff) | |
download | php-git-715d5d2855a0c6946ac99f1631a4dd9168b0cbfe.tar.gz |
Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.
This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c.
Now explicit type casting may be required on call site.
This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
Diffstat (limited to 'sapi/phpdbg/phpdbg_watch.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_watch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c index 8c36d51223..06a0bbefe8 100644 --- a/sapi/phpdbg/phpdbg_watch.c +++ b/sapi/phpdbg/phpdbg_watch.c @@ -185,7 +185,7 @@ static phpdbg_watchpoint_t *phpdbg_create_refcounted_watchpoint(phpdbg_watchpoin watch->parent = parent; watch->str = parent->str; ++GC_REFCOUNT(parent->str); - phpdbg_create_addr_watchpoint(&ref->refcount, sizeof(uint32_t), watch); + phpdbg_create_addr_watchpoint(&GC_REFCOUNT(ref), sizeof(uint32_t), watch); watch->type = WATCH_ON_REFCOUNTED; return watch; @@ -1047,7 +1047,7 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump) { } if (Z_REFCOUNTED_P(watch->addr.zv)) { if ((watch->flags & PHPDBG_WATCH_NORMAL) && (PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS)) { - phpdbg_writeln("watchrefcount", "type=\"new\" refcount=\"%d\"", "New refcount: %d", Z_COUNTED_P(watch->addr.zv)->refcount); + phpdbg_writeln("watchrefcount", "type=\"new\" refcount=\"%d\"", "New refcount: %d", Z_REFCOUNT_P(watch->addr.zv)); } if (watch->flags & PHPDBG_WATCH_RECURSIVE) { phpdbg_create_recursive_watchpoint(watch); @@ -1079,8 +1079,8 @@ static void phpdbg_print_changed_zval(phpdbg_watch_memdump *dump) { break; case WATCH_ON_REFCOUNTED: { if ((watch->flags & PHPDBG_WATCH_NORMAL) && (PHPDBG_G(flags) & PHPDBG_SHOW_REFCOUNTS)) { - phpdbg_writeln("watchrefcount", "type=\"old\" refcount=\"%d\"", "Old refcount: %d", ((zend_refcounted *) oldPtr)->refcount); - phpdbg_writeln("watchrefcount", "type=\"new\" refcount=\"%d\"", "New refcount: %d", watch->addr.ref->refcount); + phpdbg_writeln("watchrefcount", "type=\"old\" refcount=\"%d\"", "Old refcount: %d", GC_REFCOUNT((zend_refcounted *) oldPtr)); + phpdbg_writeln("watchrefcount", "type=\"new\" refcount=\"%d\"", "New refcount: %d", GC_REFCOUNT(watch->addr.ref)); } break; } |