#include "php_psi.h"
#include "token.h"
#include "parser.h"
+#include "cpp.h"
#define PSI_CPP_SEARCH
#include "php_psi_cpp.h"
psi_validate_scope_dtor(&S);
psi_data_dtor(&D);
psi_parser_dtor(&P);
- free(I);
+ psi_parser_input_free(&I);
}
ZEND_BEGIN_ARG_INFO_EX(ai_psi_validate_string, 0, 0, 1)
psi_validate_scope_dtor(&S);
psi_data_dtor(&D);
psi_parser_dtor(&P);
- free(I);
+ psi_parser_input_free(&I);
}
static ZEND_RESULT_CODE psi_ops_load()
return SUCCESS;
}
+PHP_MINIT_FUNCTION(psi_cpp);
static PHP_MINIT_FUNCTION(psi)
{
zend_class_entry ce = {0};
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;
}
return SUCCESS;
}
+PHP_MSHUTDOWN_FUNCTION(psi_cpp);
static PHP_MSHUTDOWN_FUNCTION(psi)
{
if (psi_check_env("PSI_DUMP")) {
PSI_G(ops)->free();
}
+ PHP_MSHUTDOWN(psi_cpp)(type, module_number);
+
UNREGISTER_INI_ENTRIES();
return SUCCESS;