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

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@remicollet
Contributor

remicollet commented Jun 27, 2018

No description provided.

GC_REFCOUNT(&le) = 1;
#else
GC_SET_REFCOUNT(&le, 1);
#endif

This comment has been minimized.

@remicollet

remicollet Jun 27, 2018

Contributor

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));

This comment has been minimized.

@remicollet

remicollet Jun 27, 2018

Contributor

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);

This comment has been minimized.

@remicollet

remicollet Jun 27, 2018

Contributor

-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;

This comment has been minimized.

@remicollet

remicollet Jun 27, 2018

Contributor

-Wunused-but-set-variable

@remicollet

This comment has been minimized.

Contributor

remicollet commented Jun 27, 2018

Notice: this only fix the build, there is something wrong, test suite segfault in various test...

@edhelas

This comment has been minimized.

edhelas commented Nov 7, 2018

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.

@edhelas

This comment has been minimized.

edhelas commented Nov 15, 2018

I applied your patch and tried with Movim, still having a zend_mm_heap corrupted when using php-zmq.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment