mypeb
mypeb copied to clipboard
PHP 7.0 support missing
Build fails with PHP 7.0.
On FreeBSD 10.1 with clang 3.4.1:
peb.c:271:3: warning: implicit declaration of function 'ALLOC_INIT_ZVAL' is invalid in C99 [-Wimplicit-function-declaration] ALLOC_INIT_ZVAL(tmp); ^ peb.c:272:3: warning: implicit declaration of function 'ZVAL_RESOURCE' is invalid in C99 [-Wimplicit-function-declaration] ZVAL_RESOURCE(tmp,PEB_G(default_link)); ^ peb.c:275:3: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE2' is invalid in C99 [-Wimplicit-function-declaration] ZEND_FETCH_RESOURCE2(m, peb_link*, &tmp TSRMLS_CC,-1 , PEB_RESOURCENAME ,le_link, le_plink); ^ peb.c:275:27: error: unexpected type name 'peb_link': expected expression ZEND_FETCH_RESOURCE2(m, peb_link*, &tmp TSRMLS_CC,-1 , PEB_RESOURCENAME ,le_link, le_plink); ^ peb.c:275:36: error: expected expression ZEND_FETCH_RESOURCE2(m, peb_link*, &tmp TSRMLS_CC,-1 , PEB_RESOURCENAME ,le_link, le_plink); ^ peb.c:278:69: error: too many arguments provided to function-like macro invocation add_assoc_string(return_value, "thishostname", m->ec->thishostname,1); ^ /usr/local/include/php/Zend/zend_API.h:406:9: note: macro 'add_assoc_string' defined here #define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str) ^ peb.c:278:2: error: use of undeclared identifier 'add_assoc_string' add_assoc_string(return_value, "thishostname", m->ec->thishostname,1); ^ peb.c:279:69: error: too many arguments provided to function-like macro invocation add_assoc_string(return_value, "thisnodename", m->ec->thisnodename,1); ^ /usr/local/include/php/Zend/zend_API.h:406:9: note: macro 'add_assoc_string' defined here #define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str) ^ peb.c:279:2: error: use of undeclared identifier 'add_assoc_string' add_assoc_string(return_value, "thisnodename", m->ec->thisnodename,1); ^ peb.c:280:71: error: too many arguments provided to function-like macro invocation add_assoc_string(return_value, "thisalivename", m->ec->thisalivename,1); ^ /usr/local/include/php/Zend/zend_API.h:406:9: note: macro 'add_assoc_string' defined here #define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str) ^ peb.c:280:2: error: use of undeclared identifier 'add_assoc_string' add_assoc_string(return_value, "thisalivename", m->ec->thisalivename,1); ^ peb.c:281:75: error: too many arguments provided to function-like macro invocation add_assoc_string(return_value, "connectcookie", m->ec->ei_connect_cookie,1); ^ /usr/local/include/php/Zend/zend_API.h:406:9: note: macro 'add_assoc_string' defined here #define add_assoc_string(__arg, __key, __str) add_assoc_string_ex(__arg, __key, strlen(__key), __str) ^ peb.c:281:2: error: use of undeclared identifier 'add_assoc_string' add_assoc_string(return_value, "connectcookie", m->ec->ei_connect_cookie,1); ^ peb.c:300:3: error: use of undeclared identifier 'zend_rsrc_list_entry' zend_rsrc_list_entry * le ; ^ peb.c:300:26: error: use of undeclared identifier 'le' zend_rsrc_list_entry * le ; ^ peb.c:301:3: error: use of undeclared identifier 'zend_rsrc_list_entry' zend_rsrc_list_entry * newle; ^ peb.c:301:26: error: use of undeclared identifier 'newle' zend_rsrc_list_entry * newle; ^ peb.c:314:80: error: use of undeclared identifier 'le' if (SUCCESS==zend_hash_find(&EG(persistent_list), key , key_len+1, (void*)&le)) { ^ peb.c:315:20: error: use of undeclared identifier 'le' if (Z_TYPE_P(le)==le_plink) { ^ /usr/local/include/php/Zend/zend_types.h:337:37: note: expanded from macro 'Z_TYPE_P' #define Z_TYPE_P(zval_p) Z_TYPE(*(zval_p)) ^ /usr/local/include/php/Zend/zend_types.h:336:41: note: expanded from macro 'Z_TYPE' #define Z_TYPE(zval) zval_get_type(&(zval)) ^ peb.c:316:30: error: use of undeclared identifier 'le' alink = (peb_link *) le->ptr; ^ peb.c:318:9: warning: implicit declaration of function 'ZEND_REGISTER_RESOURCE' is invalid in C99 [-Wimplicit-function-declaration] ZEND_REGISTER_RESOURCE(return_value, alink, le_plink); ^ peb.c:371:5: error: use of undeclared identifier 'newle' newle = pemalloc(sizeof(zend_rsrc_list_entry),persistent); ^ peb.c:371:29: error: use of undeclared identifier 'zend_rsrc_list_entry' newle = pemalloc(sizeof(zend_rsrc_list_entry),persistent); ^ /usr/local/include/php/Zend/zend_alloc.h:195:64: note: expanded from macro 'pemalloc' #define pemalloc(size, persistent) ((persistent)?__zend_malloc(size):emalloc(size)) ^ fatal error: too many errors emitted, stopping now [-ferror-limit=]
PHP 7 support would be really nice.
I haven't been using PHP in years. If you feel like creating a PR I'd be happy to merge it
I'll have to eventually, but given lack of time it would be great if someone else did it :smile:
Given the C extension API changes, it seems it'll require a major rewrite, though...