From 60a8bd52a299521a53e770961779950b83c83b56 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 29 Nov 2015 07:42:17 +0100 Subject: [PATCH] tokenizer is required, fix #1 --- .gitignore | 1 + config.m4 | 3 ++- php_pcs.c | 10 +++++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/config.m4 b/config.m4 index 6a093c1..18de3cf 100644 --- a/config.m4 +++ b/config.m4 @@ -12,7 +12,8 @@ if test "$PHP_PCS" != "no"; then fi fi PHP_NEW_EXTENSION(pcs, php_pcs.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) - # PCS must be loaded after SPL + # PCS must be loaded after tokenizer and SPL + PHP_ADD_EXTENSION_DEP(pcs, tokenizer) PHP_ADD_EXTENSION_DEP(pcs, spl) fi diff --git a/php_pcs.c b/php_pcs.c index f43307c..d9788bb 100644 --- a/php_pcs.c +++ b/php_pcs.c @@ -242,8 +242,16 @@ static PHP_MSHUTDOWN_FUNCTION(pcs) /*---------------------------------------------------------------*/ /*-- Module definition --*/ +static const zend_module_dep pcs_deps[] = { + ZEND_MOD_REQUIRED("tokenizer") + ZEND_MOD_REQUIRED("SPL") + ZEND_MOD_END +}; + zend_module_entry pcs_module_entry = { - STANDARD_MODULE_HEADER, + STANDARD_MODULE_HEADER_EX, + NULL, + pcs_deps, MODULE_NAME, NULL, PHP_MINIT(pcs),