Skip to content
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

Dereference values to always get the underlying value #151

Merged
merged 2 commits into from
Dec 12, 2021

Conversation

crocodele
Copy link
Collaborator

@crocodele crocodele commented Dec 12, 2021

@crocodele crocodele requested a review from mk6i December 12, 2021 15:02
@github-actions github-actions bot added the bugfix PR that fixes a bug label Dec 12, 2021
@mk6i
Copy link
Collaborator

mk6i commented Dec 12, 2021

@crocodele Nice find!

I was a bit curious as to why there were two calls to ZVAL_DEREF() and dug into the code a bit. Turns out it's a smell for a refactoring I've been meaning to do. Previously, we passed tok->next() to exec_recursive_descent(). To be consistent with how the other functions work, we should pass the actual AST_RECURSE token instead. Now we should only need to call ZVAL_DEREF() in one place.

Would you please take a look at my last commit? Feel free to merge this PR if you approve.

@crocodele
Copy link
Collaborator Author

@mkaminski1988, thanks, makes sense. 🙂

@crocodele crocodele merged commit 2248caf into main Dec 12, 2021
@crocodele crocodele deleted the fix/ValuesByReference branch December 12, 2021 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix PR that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Values assigned by reference are not found
2 participants