php-qrencode icon indicating copy to clipboard operation
php-qrencode copied to clipboard

Support PHP 7

Open n0ts opened this issue 10 years ago • 0 comments

Hi, I tried on PHP 7.0.1, but I had below error.

$ phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012

$ make
...
php-qrencode/qrencode.c:142:27: error: unknown type name 'zend_rsrc_list_entry'
static void qrencode_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) {
                          ^
php-qrencode/qrencode.c:235:41: error: too many arguments provided to function-like macro invocation
    RETURN_STRING(PHP_QRENCODE_VERSION, 1);
                                        ^
php70/7.0.1/include/php/Zend/zend_API.h:637:9: note: macro 'RETURN_STRING' defined here
#define RETURN_STRING(s)                                { RETVAL_STRING(s); return; }
        ^
php-qrencode/qrencode.c:235:5: error: use of undeclared identifier 'RETURN_STRING'
    RETURN_STRING(PHP_QRENCODE_VERSION, 1);
    ^
php-qrencode/qrencode.c:280:5: warning: implicit declaration of function 'ZEND_REGISTER_RESOURCE' is
      invalid in C99 [-Wimplicit-function-declaration]
    ZEND_REGISTER_RESOURCE(return_value, qe, le_qrencode);
    ^
php-qrencode/qrencode.c:319:5: warning: implicit declaration of function 'ZEND_FETCH_RESOURCE' is
      invalid in C99 [-Wimplicit-function-declaration]
    ZEND_FETCH_RESOURCE(qe, qrencode*, &zqe, -1, QRENCODE_RESOURCE_TYPE, le_qrencode);
    ^
php-qrencode/qrencode.c:319:29: error: unexpected type name 'qrencode': expected expression
    ZEND_FETCH_RESOURCE(qe, qrencode*, &zqe, -1, QRENCODE_RESOURCE_TYPE, le_qrencode);
                            ^
php-qrencode/qrencode.c:319:38: error: expected expression
    ZEND_FETCH_RESOURCE(qe, qrencode*, &zqe, -1, QRENCODE_RESOURCE_TYPE, le_qrencode);
                                     ^
php-qrencode/qrencode.c:391:29: error: unexpected type name 'qrencode': expected expression
    ZEND_FETCH_RESOURCE(qe, qrencode*, &zqe, -1, QRENCODE_RESOURCE_TYPE, le_qrencode);
                            ^
php-qrencode/qrencode.c:391:38: error: expected expression
    ZEND_FETCH_RESOURCE(qe, qrencode*, &zqe, -1, QRENCODE_RESOURCE_TYPE, le_qrencode);
                                     ^
php-qrencode/qrencode.c:409:5: warning: implicit declaration of function 'php_gd_gdImagePngCtxEx' is
      invalid in C99 [-Wimplicit-function-declaration]
    gdImagePngCtxEx(im, ctx, -1)

Thanks

n0ts avatar Dec 31 '15 05:12 n0ts