10 #include "ext/standard/info.h"
13 ZEND_DECLARE_MODULE_GLOBALS(psi
);
16 STD_PHP_INI_ENTRY("psi.directory", "psis", PHP_INI_ALL
, OnUpdateString
, directory
, zend_psi_globals
, psi_globals
)
19 PHP_MINIT_FUNCTION(psi
)
23 REGISTER_INI_ENTRIES();
27 if (!(ctx
= jit_context_create())) {
28 zend_error(E_WARNING
, "Could not initialize libjit!");
36 PHP_MSHUTDOWN_FUNCTION(psi
)
38 jit_context_t
*ctx
= PSI_G(context
);
40 jit_context_destroy(ctx
);
42 UNREGISTER_INI_ENTRIES();
47 /* Remove if there's nothing to do at request start */
48 /* {{{ PHP_RINIT_FUNCTION
50 PHP_RINIT_FUNCTION(psi
)
52 #if defined(COMPILE_DL_PSI) && defined(ZTS)
53 ZEND_TSRMLS_CACHE_UPDATE();
59 /* Remove if there's nothing to do at request end */
60 /* {{{ PHP_RSHUTDOWN_FUNCTION
62 PHP_RSHUTDOWN_FUNCTION(psi
)
68 PHP_MINFO_FUNCTION(psi
)
70 php_info_print_table_start();
71 php_info_print_table_header(2, "psi support", "enabled");
72 php_info_print_table_end();
74 DISPLAY_INI_ENTRIES();
76 const zend_function_entry psi_functions
[] = {
80 zend_module_entry psi_module_entry
= {
81 STANDARD_MODULE_HEADER
,
86 PHP_RINIT(psi
), /* Replace with NULL if there's nothing to do at request start */
87 PHP_RSHUTDOWN(psi
), /* Replace with NULL if there's nothing to do at request end */
90 STANDARD_MODULE_PROPERTIES
95 ZEND_TSRMLS_CACHE_DEFINE();
105 * vim600: noet sw=4 ts=4 fdm=marker
106 * vim<600: noet sw=4 ts=4