X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodule.c;h=90a838da0e849aef935d7ae4bd55b5e689eaca1c;hb=3bca631112f4865510ea91c85e8c820c4465fc14;hp=389cbc5752e123fc33cd1fab4eb8a4f7c264da80;hpb=7d79fea75fc664e54a5d5a2668a55f554296a845;p=m6w6%2Fext-psi diff --git a/src/module.c b/src/module.c index 389cbc5..90a838d 100644 --- a/src/module.c +++ b/src/module.c @@ -26,6 +26,9 @@ PHP_INI_END(); static int psi_select_dirent(const struct dirent *entry) { +#ifndef FNM_CASEFOLD +#define FNM_CASEFOLD 0 +#endif return 0 == fnmatch("*.psi", entry->d_name, FNM_CASEFOLD); } @@ -83,9 +86,11 @@ PHP_MINIT_FUNCTION(psi) zend_function_entry *closures = PSI_CompilerCompile(&C); if (closures) { - zend_register_functions(NULL, closures, NULL, MODULE_PERSISTENT); + if (SUCCESS != zend_register_functions(NULL, closures, NULL, MODULE_PERSISTENT)) { + fprintf(stderr, "Failed to register functions!\n"); + } } - PSI_CompilerDtor(&C); + //PSI_CompilerDtor(&C); } jit_context_build_end(ctx); }