mkoppanen / php-tokyo_tyrant

Experimental tokyo_tyrant extension for PHP
http://pecl.php.net/package/tokyo_tyrant
Other
37 stars 10 forks source link

PHP7 Support #11

Open nobuf opened 8 years ago

nobuf commented 8 years ago

Hi- I see bunch of errors when I run sudo pecl install tokyo_tyrant-beta in PHP7. With looking at the upgrade guide, some of those errors look okay I can probably replace the old function to a new one.

Other than that, do you think it would require significant changes? I would be really appreciate any caveat before I dive into further.

running: make
/bin/sh /var/tmp/pear-build-rootDsPo5T/tokyo_tyrant-0.7.0/libtool --mode=compile cc  -I. -I/var/tmp/tokyo_tyrant -DPHP_ATOM_INC -I/var/tmp/pear-build-rootDsPo5T/tokyo_tyrant-0.7.0/include -I/var/tmp/pear-build-rootDsPo5T/tokyo_tyrant-0.7.0/main -I/var/tmp/tokyo_tyrant -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /var/tmp/tokyo_tyrant/tokyo_tyrant.c -o tokyo_tyrant.lo
libtool: compile:  cc -I. -I/var/tmp/tokyo_tyrant -DPHP_ATOM_INC -I/var/tmp/pear-build-rootDsPo5T/tokyo_tyrant-0.7.0/include -I/var/tmp/pear-build-rootDsPo5T/tokyo_tyrant-0.7.0/main -I/var/tmp/tokyo_tyrant -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /var/tmp/tokyo_tyrant/tokyo_tyrant.c  -fPIC -DPIC -o .libs/tokyo_tyrant.o
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant___construct’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:65: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_connect’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:91: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_connecturi’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:121: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘_php_tt_op_many’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:194: error: ‘zend_hash_key’ has no member named ‘nKeyLength’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:199: error: ‘zend_hash_key’ has no member named ‘arKey’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:200: error: ‘zend_hash_key’ has no member named ‘nKeyLength’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘_php_tt_write_wrapper’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:234: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_putshl’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:347: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_getiterator’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:384: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:387: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_get’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:409: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:439:37: error: macro "RETVAL_STRINGL" passed 3 arguments, but takes just 2
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:439: error: ‘RETVAL_STRINGL’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:439: error: (Each undeclared identifier is reported only once
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:439: error: for each function it appears in.)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_add’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:464: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_sync’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:518: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_tune’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:540: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_vanish’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:559: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_stat’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:580: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:601:41: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:601: error: ‘add_assoc_string’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_size’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:622: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_num’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:645: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_fwmkeys’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:665: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:673: error: too many arguments to function ‘add_next_index_stringl’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_ext’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:694: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:700:27: error: macro "RETVAL_STRING" passed 2 arguments, but takes just 1
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:700: error: ‘RETVAL_STRING’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_copy’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:718: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_restore’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:813: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrant_setmaster’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:892: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyranttable_getquery’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:927: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:930: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyranttable_genuid’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:953: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘_php_tt_table_write_wrapper’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:975: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1028:34: error: macro "RETVAL_STRINGL" passed 3 arguments, but takes just 2
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1028: error: ‘RETVAL_STRINGL’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyranttable_get’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1107: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyranttable_setindex’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1170: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery___construct’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1196: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_setlimit’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1216: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_setorder’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1251: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_addcond’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1272: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_hint’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1293: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1295:31: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1295: error: ‘RETURN_STRING’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_metasearch’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1321: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1330: warning: passing argument 2 of ‘zend_hash_get_current_data_ex’ from incompatible pointer type
/usr/include/php/Zend/zend_hash.h:171: note: expected ‘HashPosition *’ but argument is of type ‘void **’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1330: error: too many arguments to function ‘zend_hash_get_current_data_ex’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1332: warning: passing argument 1 of ‘instanceof_function_ex’ makes pointer from integer without a cast
/usr/include/php/Zend/zend_operators.h:73: note: expected ‘const struct zend_class_entry *’ but argument is of type ‘int’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1340: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_search’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1374: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_count’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1396: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_out’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1412: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_key’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1434: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1445:39: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1445: error: ‘RETURN_STRINGL’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_next’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1463: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1488:76: error: macro "add_assoc_stringl" passed 5 arguments, but takes just 4
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1488: error: ‘add_assoc_stringl’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_rewind’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1509: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_current’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1533: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1558:76: error: macro "add_assoc_stringl" passed 5 arguments, but takes just 4
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1558: error: ‘add_assoc_stringl’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantquery_valid’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1580: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantiterator___construct’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1605: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantiterator_key’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1620: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1625:57: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1625: error: ‘RETURN_STRINGL’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantiterator_next’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1637: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantiterator_rewind’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1656: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantiterator_current’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1681: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1695:37: error: macro "RETVAL_STRINGL" passed 3 arguments, but takes just 2
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1695: error: ‘RETVAL_STRINGL’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zim_tokyotyrantiterator_valid’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1725: warning: cast to pointer from integer of different size
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘php_tokyo_tyrant_query_object_free_storage’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1961: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/include/php/Zend/zend_variables.h:112: note: expected ‘struct zval *’ but argument is of type ‘struct zval **’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: At top level:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:1987: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘php_tokyo_tyrant_query_object_new’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘php_tokyo_tyrant_iterator_object_free_storage’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2022: warning: passing argument 1 of ‘_zval_ptr_dtor’ from incompatible pointer type
/usr/include/php/Zend/zend_variables.h:112: note: expected ‘struct zval *’ but argument is of type ‘struct zval **’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: At top level:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2028: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘php_tokyo_tyrant_iterator_object_new’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2063: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘php_tokyo_tyrant_object_new_ex’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2088: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘php_tokyo_tyrant_object_new’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2093: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘php_tokyo_tyrant_clone_object’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘OnUpdateKeyPrefix’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2109: error: ‘new_value_length’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2114: warning: passing argument 6 of ‘OnUpdateString’ makes integer from pointer without a cast
/usr/include/php/Zend/zend_ini.h:162: note: expected ‘int’ but argument is of type ‘void *’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2114: error: too many arguments to function ‘OnUpdateString’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c: In function ‘zm_startup_tokyo_tyrant’:
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2158: error: ‘php_tokyo_tyrant_object_new’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2159: error: ‘php_tokyo_tyrant_clone_object’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2165: error: too many arguments to function ‘zend_register_internal_class_ex’
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2168: error: ‘php_tokyo_tyrant_query_object_new’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2174: error: ‘php_tokyo_tyrant_iterator_object_new’ undeclared (first use in this function)
/var/tmp/tokyo_tyrant/tokyo_tyrant.c:2180: error: too many arguments to function ‘zend_register_internal_class_ex’
make: *** [tokyo_tyrant.lo] Error 1
ERROR: `make' failed
mkoppanen commented 8 years ago

Hey,

I didn't know that this extension still had active users so I put this in the backlog. I have fairly limited amount of free time to split among zmq, memcached, imagick etc.

I can try to get php7 branch up and running during today after I am done with the day to day work. It would be great if you can test it against your code and report back how things work.

I'll update this issue as soon as I have a branch up.

Thanks, Mikko

nobuf commented 8 years ago

Awesome. I'll test it and get back to you for sure.

mkoppanen commented 8 years ago

Looks like it's quite a task. php7-wip branch, but it's not even close to buildable state