diff options
author | foobar <sniper@php.net> | 2002-08-04 21:37:44 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2002-08-04 21:37:44 +0000 |
commit | ed4267cf342b50871578398e19b96fb144c382c0 (patch) | |
tree | b4a754eaf3a8aface92405d5b6dd9ea71a8bd052 /ext/mhash | |
parent | 367ca8e2ae7bbdc145562266756189047961928e (diff) | |
download | php-git-ed4267cf342b50871578398e19b96fb144c382c0.tar.gz |
Add PHP_MINFO_*
Diffstat (limited to 'ext/mhash')
-rw-r--r-- | ext/mhash/mhash.c | 20 | ||||
-rw-r--r-- | ext/mhash/php_mhash.h | 2 |
2 files changed, 18 insertions, 4 deletions
diff --git a/ext/mhash/mhash.c b/ext/mhash/mhash.c index e7ba9ed85b..c2f22818a3 100644 --- a/ext/mhash/mhash.c +++ b/ext/mhash/mhash.c @@ -41,24 +41,24 @@ function_entry mhash_functions[] = { {NULL, NULL, NULL} }; -static PHP_MINIT_FUNCTION(mhash); - zend_module_entry mhash_module_entry = { STANDARD_MODULE_HEADER, "mhash", mhash_functions, PHP_MINIT(mhash), NULL, NULL, NULL, - NULL, - NO_VERSION_YET, + PHP_MINFO(mhash), + NO_VERSION_YET, STANDARD_MODULE_PROPERTIES, }; #ifdef COMPILE_DL_MHASH ZEND_GET_MODULE(mhash) #endif + #define MHASH_FAILED_MSG "mhash initialization failed" #define MHASH_KEYGEN_FAILED_MSG "mhash key generation failed" + static PHP_MINIT_FUNCTION(mhash) { int i; @@ -79,6 +79,18 @@ static PHP_MINIT_FUNCTION(mhash) return SUCCESS; } +PHP_MINFO_FUNCTION(mhash) +{ + char version[32]; + + sprintf(version,"%d", MHASH_API_VERSION); + + php_info_print_table_start(); + php_info_print_table_row(2, "MHASH support", "Enabled"); + php_info_print_table_row(2, "MHASH API Version", version); + php_info_print_table_end(); +} + /* {{{ proto int mhash_count(void) Gets the number of available hashes */ PHP_FUNCTION(mhash_count) diff --git a/ext/mhash/php_mhash.h b/ext/mhash/php_mhash.h index 9acd447d81..00df652164 100644 --- a/ext/mhash/php_mhash.h +++ b/ext/mhash/php_mhash.h @@ -12,6 +12,8 @@ extern zend_module_entry mhash_module_entry; #define mhash_module_ptr &mhash_module_entry +static PHP_MINIT_FUNCTION(mhash); +PHP_MINFO_FUNCTION(mhash); PHP_FUNCTION(mhash_get_block_size); PHP_FUNCTION(mhash_get_hash_name); PHP_FUNCTION(mhash_count); |