cvs: php-src /ext/hash hash.c /ext/mhash CREDITS config.m4 config.w32 mhash.c php_mhash.h
| From: | Scott MacVicar | Date: | Thu, 27 Nov 2008 21:11:51 +0000 |
| Subject: | cvs: php-src /ext/hash hash.c /ext/mhash CREDITS config.m4 config.w32 mhash.c php_mhash.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-54517@lists.php.net to get a copy of this message | ||
scottmac Thu Nov 27 21:11:51 2008 UTC
Removed files:
/php-src/ext/mhash CREDITS config.m4 config.w32 mhash.c php_mhash.h
Modified files:
/php-src/ext/hash hash.c
Log:
Move mhash extension registration code into the hash module startup. This allows
extension_loaded('mhash'); to work.
http://cvs.php.net/viewvc.cgi/php-src/ext/hash/hash.c?r1=1.51&r2=1.52&diff_format=u
Index: php-src/ext/hash/hash.c
diff -u php-src/ext/hash/hash.c:1.51 php-src/ext/hash/hash.c:1.52
--- php-src/ext/hash/hash.c:1.51 Mon Nov 17 11:26:20 2008
+++ php-src/ext/hash/hash.c Thu Nov 27 21:11:51 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash.c,v 1.51 2008/11/17 11:26:20 felipe Exp $ */
+/* $Id: hash.c,v 1.52 2008/11/27 21:11:51 scottmac Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -776,6 +776,27 @@
#ifdef PHP_MHASH_BC
+PHP_MINFO_FUNCTION(mhash)
+{
+ php_info_print_table_start();
+ php_info_print_table_row(2, "MHASH support", "Enabled");
+ php_info_print_table_row(2, "MHASH API Version", "Emulated Support");
+ php_info_print_table_end();
+}
+
+zend_module_entry mhash_module_entry = {
+ STANDARD_MODULE_HEADER,
+ "mhash",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ PHP_MINFO(mhash),
+ NO_VERSION_YET,
+ STANDARD_MODULE_PROPERTIES,
+};
+
static void mhash_init(INIT_FUNC_ARGS)
{
char buf[128];
@@ -791,6 +812,8 @@
len = slprintf(buf, 127, "MHASH_%s", algorithm.mhash_name,
strlen(algorithm.mhash_name));
zend_register_long_constant(buf, len + 1, algorithm.value, CONST_CS | CONST_PERSISTENT,
module_number TSRMLS_CC);
}
+
+ zend_register_module_ex(&mhash_module_entry TSRMLS_CC);
}
/* {{{ proto binary mhash(int hash, binary data [, binary key]) U