Skip to content

Commit d5f6e56

Browse files
authored
[ci skip] Clarify intention in phpdbg, removing one TODO comment (#16014)
The point of WATCH_ON_BUCKET is to watch for all 3 fields of the bucket, so the fallthrough is intended.
1 parent 7f88f4c commit d5f6e56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sapi/phpdbg/phpdbg_watch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ const phpdbg_command_t phpdbg_watch_commands[] = {
138138
bool phpdbg_check_watch_diff(phpdbg_watchtype type, void *oldPtr, void *newPtr) {
139139
switch (type) {
140140
case WATCH_ON_BUCKET:
141-
if (memcmp(&((Bucket *) oldPtr)->h, &((Bucket *) newPtr)->h, sizeof(Bucket) - sizeof(zval) /* key/val comparison */) != 0) {
141+
if (memcmp(&((Bucket *) oldPtr)->h, &((Bucket *) newPtr)->h, sizeof(Bucket) - sizeof(zval) /* hash+key comparison */) != 0) {
142142
return 2;
143143
}
144-
/* TODO: Is this intentional? */
144+
/* Fall through to also compare the value from the bucket. */
145145
ZEND_FALLTHROUGH;
146146
case WATCH_ON_ZVAL:
147147
return memcmp(oldPtr, newPtr, sizeof(zend_value) + sizeof(uint32_t) /* value + typeinfo */) != 0;

0 commit comments

Comments
 (0)