Repository navigation
tree: Use zend_string accessor macros consistently #25564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
adapik
wants to merge
1
commit into
php:master
Choose a base branch
from
adapik:zstr-macros
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+53
−53
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -309,7 +309,7 @@ static zend_execute_data* ZEND_FASTCALL zend_jit_int_extend_stack_helper(uint32_ | |
| static zval* ZEND_FASTCALL zend_jit_symtable_find(HashTable *ht, zend_string *str) | ||
| { | ||
| zend_ulong idx; | ||
| register const char *tmp = str->val; | ||
| register const char *tmp = ZSTR_VAL(str); | ||
|
|
||
| do { | ||
| if (*tmp > '9') { | ||
|
|
@@ -323,7 +323,7 @@ static zval* ZEND_FASTCALL zend_jit_symtable_find(HashTable *ht, zend_string *st | |
| break; | ||
| } | ||
| } | ||
| if (_zend_handle_numeric_str_ex(str->val, str->len, &idx)) { | ||
| if (_zend_handle_numeric_str_ex(ZSTR_VAL(str), ZSTR_LEN(str), &idx)) { | ||
| return zend_hash_index_find(ht, idx); | ||
| } | ||
| } while (0); | ||
|
|
@@ -367,7 +367,7 @@ static zval* ZEND_FASTCALL zend_jit_hash_lookup_rw(HashTable *ht, zend_string *s | |
| static zval* ZEND_FASTCALL zend_jit_symtable_lookup_rw(HashTable *ht, zend_string *str) | ||
| { | ||
| zend_ulong idx; | ||
| register const char *tmp = str->val; | ||
| register const char *tmp = ZSTR_VAL(str); | ||
| zval *retval; | ||
|
|
||
| do { | ||
|
|
@@ -382,7 +382,7 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_rw(HashTable *ht, zend_strin | |
| break; | ||
| } | ||
| } | ||
| if (_zend_handle_numeric_str_ex(str->val, str->len, &idx)) { | ||
| if (_zend_handle_numeric_str_ex(ZSTR_VAL(str), ZSTR_LEN(str), &idx)) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
| retval = zend_hash_index_find(ht, idx); | ||
| if (!retval) { | ||
| retval = zend_undefined_offset_write(ht, idx); | ||
|
|
@@ -402,7 +402,7 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_rw(HashTable *ht, zend_strin | |
| static zval* ZEND_FASTCALL zend_jit_symtable_lookup_w(HashTable *ht, zend_string *str) | ||
| { | ||
| zend_ulong idx; | ||
| register const char *tmp = str->val; | ||
| register const char *tmp = ZSTR_VAL(str); | ||
|
|
||
| do { | ||
| if (*tmp > '9') { | ||
|
|
@@ -416,7 +416,7 @@ static zval* ZEND_FASTCALL zend_jit_symtable_lookup_w(HashTable *ht, zend_string | |
| break; | ||
| } | ||
| } | ||
| if (_zend_handle_numeric_str_ex(str->val, str->len, &idx)) { | ||
| if (_zend_handle_numeric_str_ex(ZSTR_VAL(str), ZSTR_LEN(str), &idx)) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto |
||
| return zend_hash_index_lookup(ht, idx); | ||
| } | ||
| } while (0); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should really be
ZEND_HANDLE_NUMERIC, actually the whole code above could be replaced by an if/else with ZEND_HANDLE_NUMERIC.