Skip to content

Support PHP 7 #4

Description

@n0ts

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions