-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Better c zend api #6002
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
Better c zend api #6002
Conversation
39d64b2
to
989d9ce
Compare
I don't like the ZEND_RESULT_CODE name, type name should not be uppercase... At the least this should be |
Should I typedef |
da4eb7d
to
021babd
Compare
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.
From a quick scroll through, this looks reasonable to me.
Zend/zend_exceptions.c
Outdated
@@ -1,4 +1,4 @@ | |||
/* | |||
/* |
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.
Spurious change.
eae2061
to
fccf5f8
Compare
@nikic do you have any idea what I would need to do/change in the JIT at line 7930 of |
Might be due to EXT_CALL zend_is_true, r0 in zend_jit_x86.dasc line 7932
fccf5f8
to
9ffcda2
Compare
BUG in _str_dtor https://github.com/php/php-src/blob/master/Zend/zend_string.c#L72 Critical error in zend_hash_destroy function on pointer deallocation Line 1609 in 14830ab
When closing the application from Line 1831 in 521c36c
Fix that fixes the error when closing Assign emptiness (NULL) |
BUG FIX!!!! , 1 ZEND_API void zend_interned_strings_activate(void){ |
Please open a new PR and or a bug ticket |
This is an attempt to make the API of the Zend engine easier to use.
Functions which only return
SUCCESS
and don't need to return such a value due to other engine API are changed tovoid
Functions which return the values
SUCCESS
orFAILURE
exclusively are changed to return the corresponding enumZEND_RESULT_CODE
as they have boolean semantics but cannot use the nativebool
type and the return value needs to be compared toSUCCESS
/FAILURE
Functions returning/accepting a boolean value are clearly marked so.
I'm aware of the JIT failure, but I would like to know the opinions of others on this change before I pursue fixing them.