wulijun / php-ext-trie-filter

php extension for spam word filter based on Double-Array Trie tree, it can detect if a spam word exists in a text message. 关键词过滤扩展,用于检查一段文本中是否出现敏感词,基于Double-Array Trie 树实现。
514 stars 169 forks source link

make error #12

Open xiaolin2843 opened 7 years ago

xiaolin2843 commented 7 years ago

php version 7.1.9

/usr/local/src/php-ext-trie-filter/trie_filter.c:82:34: 错误:未知的类型名‘_zend_rsrc_list_entry’ static void php_trie_filter_dtor(_zend_rsrc_list_entry *rsrc TSRMLS_DC) ^ /usr/local/src/php-ext-trie-filter/trie_filter.c: 在函数‘zm_startup_trie_filter’中: /usr/local/src/php-ext-trie-filter/trie_filter.c:93:4: 错误:‘php_trie_filter_dtor’未声明(在此函数内第一次使用) php_trie_filter_dtor, ^ /usr/local/src/php-ext-trie-filter/trie_filter.c:93:4: 附注:每个未声明的标识符在其出现的函数内只报告一次

▽ / }}} / /usr/local/src/php-ext-trie-filter/trie_filter.c: 在函数‘zif_trie_filter_search’中: /usr/local/src/php-ext-trie-filter/trie_filter.c:244:28: 错误:expected expression before ‘Trie’ ZEND_FETCH_RESOURCE(trie, Trie , &trie_resource, -1, ^ /usr/local/src/php-ext-trie-filter/trie_filter.c: 在函数‘zif_trie_filter_search_all’中: /usr/local/src/php-ext-trie-filter/trie_filter.c:292:28: 错误:expected expression before ‘Trie’ ZEND_FETCH_RESOURCE(trie, Trie , &trie_resource, -1, ^ /usr/local/src/php-ext-trie-filter/trie_filter.c: 在函数‘zif_trie_filter_store’中: /usr/local/src/php-ext-trie-filter/trie_filter.c:360:28: 错误:expected expression before ‘Trie’ ZEND_FETCH_RESOURCE(trie, Trie , &trie_resource, -1, PHP_TRIE_FILTER_RES_NAME, le_trie_filter); ^ /usr/local/src/php-ext-trie-filter/trie_filter.c: 在函数‘zif_trie_filter_save’中: /usr/local/src/php-ext-trie-filter/trie_filter.c:392:31: 错误:expected expression before ‘Trie’ ZEND_FETCH_RESOURCE(trie, Trie , &trie_resource, -1, PHP_TRIE_FILTER_RES_NAME, le_trie_filter); ^ /usr/local/src/php-ext-trie-filter/trie_filter.c: 在函数‘zif_trie_filter_free’中: /usr/local/src/php-ext-trie-filter/trie_filter.c:411:31: 错误:expected expression before ‘Trie’ ZEND_FETCH_RESOURCE(trie, Trie *, &trie_resource, -1, PHP_TRIE_FILTER_RES_NAME, le_trie_filter); ^ /usr/local/src/php-ext-trie-filter/trie_filter.c:413:5: 警告:传递‘zend_list_delete’的第 1 个参数时将整数赋给指针,未作类型转换 [默认启用] if (zend_list_delete(resource_id) == SUCCESS) { ^

lmxdawn commented 6 years ago

同问

NLison commented 6 years ago

很明显某些底层函数 , PHP7并不支持

yuanyinghao commented 6 years ago

php7的源码可以去复习一下,_zend_rsrc_list_entry 在php7里面已经不支持了,可以自己改一下扩展的源码