cvs: php-src(PHP_5_3) /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:55 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /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-54518@lists.php.net to get a copy of this message | ||
scottmac Thu Nov 27 21:11:55 2008 UTC
Removed files: (Branch: PHP_5_3)
/php-src/ext/mhash CREDITS config.m4 config.w32 mhash.c php_mhash.h
Modified files:
/php-src/ext/hash hash.c
Log:
MFH 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.18.2.5.2.7.2.14&r2=1.18.2.5.2.7.2.15&diff_format=u
Index: php-src/ext/hash/hash.c
diff -u php-src/ext/hash/hash.c:1.18.2.5.2.7.2.14 php-src/ext/hash/hash.c:1.18.2.5.2.7.2.15
--- php-src/ext/hash/hash.c:1.18.2.5.2.7.2.14 Mon Nov 17 11:27:55 2008
+++ php-src/ext/hash/hash.c Thu Nov 27 21:11:55 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hash.c,v 1.18.2.5.2.7.2.14 2008/11/17 11:27:55 felipe Exp $ */
+/* $Id: hash.c,v 1.18.2.5.2.7.2.15 2008/11/27 21:11:55 scottmac Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -607,6 +607,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];
@@ -622,6 +643,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);
}
PHP_FUNCTION(mhash)