X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=src%2Fmodule.c;h=5ff4b50e3b4ef5035a468101f00012b892908fb5;hp=0aba56448cd92738eddca507672255f38498b5c3;hb=c0873cbbe9e5a83305adbc2bbd94aede5437f33d;hpb=2559f07a178b681dc240e20153ff5abdff54cb34 diff --git a/src/module.c b/src/module.c index 0aba564..5ff4b50 100644 --- a/src/module.c +++ b/src/module.c @@ -34,6 +34,7 @@ #include "php_psi.h" #include "token.h" #include "parser.h" +#include "cpp.h" #define PSI_CPP_SEARCH #include "php_psi_cpp.h" @@ -311,6 +312,7 @@ static ZEND_RESULT_CODE psi_ops_load() return SUCCESS; } +PHP_MINIT_FUNCTION(psi_cpp); static PHP_MINIT_FUNCTION(psi) { zend_class_entry ce = {0}; @@ -330,6 +332,10 @@ static PHP_MINIT_FUNCTION(psi) psi_object_handlers.free_obj = psi_object_free; psi_object_handlers.clone_obj = NULL; + if (SUCCESS != PHP_MINIT(psi_cpp)(type, module_number)) { + return FAILURE; + } + if (SUCCESS != psi_ops_load()) { return FAILURE; } @@ -350,6 +356,7 @@ static PHP_MINIT_FUNCTION(psi) return SUCCESS; } +PHP_MSHUTDOWN_FUNCTION(psi_cpp); static PHP_MSHUTDOWN_FUNCTION(psi) { if (psi_check_env("PSI_DUMP")) { @@ -362,6 +369,8 @@ static PHP_MSHUTDOWN_FUNCTION(psi) PSI_G(ops)->free(); } + PHP_MSHUTDOWN(psi_cpp)(type, module_number); + UNREGISTER_INI_ENTRIES(); return SUCCESS;