-
Notifications
You must be signed in to change notification settings - Fork 119
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
Fix for PHP 7.3 #190
Fix for PHP 7.3 #190
Conversation
GC_REFCOUNT(&le) = 1; | ||
#else | ||
GC_SET_REFCOUNT(&le, 1); | ||
#endif |
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 UPGRADING.INTERNALS
f. GC_REFCOUNT() is turned into inline function and can't be modified direcly.
All reference-counting operations should be done through corresponding
macros GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF().
GC_REFCOUNT(p)++ should be changed into GC_ADDREF(p),
GC_REFCOUNT(p)-- into GC_DELREF(p),
GC_REFCOUNT(p) = 1 into GC_SET_REFCOUNT(p, 1).
@@ -63,7 +63,7 @@ char *php_zmq_printable_func (zend_fcall_info *fci, zend_fcall_info_cache *fci_c | |||
char *buffer = NULL; | |||
|
|||
if (fci->object) { | |||
spprintf (&buffer, 0, "%s::%s", fci->object->ce->name->val, fci_cache->function_handler->common.function_name); | |||
spprintf (&buffer, 0, "%s::%s", fci->object->ce->name->val, ZSTR_VAL(fci_cache->function_handler->common.function_name)); |
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 is a zend_string since 7.0.
PHP 7.3 now nicely raise -Wformat warning about this
@@ -169,7 +169,7 @@ static | |||
zend_string *s_create_key(zval *entry) | |||
{ | |||
if (Z_TYPE_P(entry) == IS_RESOURCE) { | |||
return strpprintf(0, "r:%ld", Z_RES_P(entry)->handle); | |||
return strpprintf(0, "r:%d", Z_RES_P(entry)->handle); |
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.
-Wformat again, hadle is an int
@@ -222,7 +222,7 @@ size_t php_zmq_pollset_num_items(php_zmq_pollset *set) | |||
zend_string *php_zmq_pollset_add(php_zmq_pollset *set, zval *entry, int events, int *error) | |||
{ | |||
zend_string *key; | |||
size_t num_items, index; | |||
size_t index; |
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.
-Wunused-but-set-variable
Notice: this only fix the build, there is something wrong, test suite segfault in various test... |
Is there some updates regarding this PR? The currently packaged version in Debian of PHP is 7.3 and it's not working anymore with the php-zmq package. |
I applied your patch and tried with Movim, still having a |
pr #193 is better |
No description provided.