8 #include "ext/standard/info.h"
14 ZEND_DECLARE_MODULE_GLOBALS(psi
);
17 STD_PHP_INI_ENTRY("psi.directory", "psis", PHP_INI_ALL
, OnUpdateString
, directory
, zend_psi_globals
, psi_globals
)
20 void psi_error(int type
, const char *msg
, ...)
26 vslprintf(buf
, 0x1000, msg
, argv
);
32 PHP_MINIT_FUNCTION(psi
)
34 REGISTER_INI_ENTRIES();
36 PSI_ContextInit(&PSI_G(context
), PSI_Libjit(), psi_error
);
37 PSI_ContextBuild(&PSI_G(context
), PSI_G(directory
));
41 PHP_MSHUTDOWN_FUNCTION(psi
)
43 PSI_ContextDtor(&PSI_G(context
));
45 UNREGISTER_INI_ENTRIES();
50 /* Remove if there's nothing to do at request start */
51 /* {{{ PHP_RINIT_FUNCTION
53 PHP_RINIT_FUNCTION(psi
)
55 #if defined(COMPILE_DL_PSI) && defined(ZTS)
56 ZEND_TSRMLS_CACHE_UPDATE();
62 /* Remove if there's nothing to do at request end */
63 /* {{{ PHP_RSHUTDOWN_FUNCTION
65 PHP_RSHUTDOWN_FUNCTION(psi
)
71 PHP_MINFO_FUNCTION(psi
)
73 php_info_print_table_start();
74 php_info_print_table_header(2, "psi support", "enabled");
75 php_info_print_table_end();
77 DISPLAY_INI_ENTRIES();
79 const zend_function_entry psi_functions
[] = {
83 zend_module_entry psi_module_entry
= {
84 STANDARD_MODULE_HEADER
,
89 PHP_RINIT(psi
), /* Replace with NULL if there's nothing to do at request start */
90 PHP_RSHUTDOWN(psi
), /* Replace with NULL if there's nothing to do at request end */
93 STANDARD_MODULE_PROPERTIES
98 ZEND_TSRMLS_CACHE_DEFINE();
108 * vim600: noet sw=4 ts=4 fdm=marker
109 * vim<600: noet sw=4 ts=4