summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2007-08-24 21:27:38 +0000
committerSara Golemon <pollita@php.net>2007-08-24 21:27:38 +0000
commit88322b95b3437f6b278ffef20ffcad4f7f56d1d3 (patch)
tree30e3737ef1f03029ed420badf18c7bfcd8e4b677
parentb2c5bdfd98ef3d21048558f9eaa297e438f1ca72 (diff)
downloadphp-git-88322b95b3437f6b278ffef20ffcad4f7f56d1d3.tar.gz
Fix hash_init() for PHP < 6
-rw-r--r--ext/hash/hash.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index d7403215bd..d12899e510 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -341,13 +341,18 @@ PHP_FUNCTION(hash_init)
{
char *algo, *key = NULL;
int algo_len, key_len = 0, argc = ZEND_NUM_ARGS();
- zend_uchar key_type;
long options = 0;
void *context;
const php_hash_ops *ops;
php_hash_data *hash;
+#if PHP_MAJOR_VERSION >= 6
+ zend_uchar key_type;
+
if (zend_parse_parameters(argc TSRMLS_CC, "s|lt", &algo, &algo_len, &options, &key, &key_len, &key_type) == FAILURE) {
+#else
+ if (zend_parse_parameters(argc TSRMLS_CC, "s|ls", &algo, &algo_len, &options, &key, &key_len) == FAILURE) {
+#endif
return;
}