cvs: php4 /ext/mhash mhash.c php_mhash.h

From: Date: Sun, 04 Aug 2002 21:37:44 +0000
Subject: cvs: php4 /ext/mhash mhash.c php_mhash.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13123@lists.php.net to get a copy of this message
sniper Sun Aug 4 17:37:44 2002 EDT Modified files: /php4/ext/mhash mhash.c php_mhash.h Log: Add PHP_MINFO_* Index: php4/ext/mhash/mhash.c diff -u php4/ext/mhash/mhash.c:1.38 php4/ext/mhash/mhash.c:1.39 --- php4/ext/mhash/mhash.c:1.38 Thu Feb 28 07:10:35 2002 +++ php4/ext/mhash/mhash.c Sun Aug 4 17:37:44 2002 @@ -41,24 +41,24 @@ {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; @@ -77,6 +77,18 @@ } 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) Index: php4/ext/mhash/php_mhash.h diff -u php4/ext/mhash/php_mhash.h:1.7 php4/ext/mhash/php_mhash.h:1.8 --- php4/ext/mhash/php_mhash.h:1.7 Mon Feb 26 13:14:29 2001 +++ php4/ext/mhash/php_mhash.h Sun Aug 4 17:37:44 2002 @@ -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);

« previous php.cvs (#13123) next »