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

Add support for Zval IS_INDIRECT #224

Merged
merged 1 commit into from
Nov 24, 2023
Merged

Add support for Zval IS_INDIRECT #224

merged 1 commit into from
Nov 24, 2023

Conversation

joehoyle
Copy link
Collaborator

@joehoyle joehoyle commented Feb 5, 2023

As mentioned in #219, I believe we're making incorrect use of IS_CALLABLE on Zval types right now. Zval type bits are never actually stored as IS_CALLABLE, which overlaps with the actual type value of IS_INDIRECT. IS_INDIRECT is almost the same as IS_REFERENCE, but is a direct reference to another Zval rather than reference object. As Zval::is_callable() and Zval::callable() don't actually make use of IS_CALLABLE then I think it's safe to switch this out.

@ptondereau
Copy link
Collaborator

@joehoyle can you please rebase?

@joehoyle joehoyle force-pushed the zval-indirect-support branch from 6e961ff to be2d253 Compare July 13, 2023 12:41
@joehoyle joehoyle requested a review from ptondereau July 13, 2023 13:41
@joehoyle
Copy link
Collaborator Author

Ok fixed merge conflicts

@joehoyle joehoyle linked an issue Jul 19, 2023 that may be closed by this pull request
@joehoyle joehoyle force-pushed the zval-indirect-support branch from 3f5d53e to c833e8d Compare July 19, 2023 11:32
@danog
Copy link
Collaborator

danog commented Oct 10, 2023

Could you please rebase?

As mentioned in #219, I believe we're making incorrect use of IS_CALLABLE on Zval types right now. Zval type bits are never actually stored as IS_CALLABLE, which overlaps with the _actual_ type value of IS_INDIRECT. IS_INDIRECT is almost the same as IS_REFERENCE, but is a direct reference to another Zval rather than reference object. As `Zval::is_callable()` and `Zval::callable()` don't actually make use of `IS_CALLABLE` then I think it's safe to switch this out.
@joehoyle joehoyle force-pushed the zval-indirect-support branch from 723ebef to 3cd7a8a Compare November 24, 2023 12:32
@joehoyle
Copy link
Collaborator Author

Ok rebazed

@danog danog merged commit 9fa97a4 into master Nov 24, 2023
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zval type flags are incorrect for IS_CALLABLE / IS_INDIRECT
3 participants