summaryrefslogtreecommitdiff
path: root/ext/hash/hash_adler32.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2008-04-21 15:37:46 +0000
committerAntony Dovgal <tony2001@php.net>2008-04-21 15:37:46 +0000
commit7c98e674b59ae0bd2a2b146d34df2a4c176cfa14 (patch)
tree9aa562ffa4ec1f45636a034006f86916f9952364 /ext/hash/hash_adler32.c
parent30437c12411a2ee8d6966d1a8197bd48847f3036 (diff)
downloadphp-git-7c98e674b59ae0bd2a2b146d34df2a4c176cfa14.tar.gz
[DOC] add hash_copy() to be able to copy hash resource
Diffstat (limited to 'ext/hash/hash_adler32.c')
-rw-r--r--ext/hash/hash_adler32.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/hash/hash_adler32.c b/ext/hash/hash_adler32.c
index 1dd161c80a..ca6c493ad2 100644
--- a/ext/hash/hash_adler32.c
+++ b/ext/hash/hash_adler32.c
@@ -49,10 +49,17 @@ PHP_HASH_API void PHP_ADLER32Final(unsigned char digest[4], PHP_ADLER32_CTX *con
context->state = 0;
}
+PHP_HASH_API int PHP_ADLER32Copy(const php_hash_ops *ops, PHP_ADLER32_CTX *orig_context, PHP_ADLER32_CTX *copy_context)
+{
+ copy_context->state = orig_context->state;
+ return SUCCESS;
+}
+
const php_hash_ops php_hash_adler32_ops = {
(php_hash_init_func_t) PHP_ADLER32Init,
(php_hash_update_func_t) PHP_ADLER32Update,
(php_hash_final_func_t) PHP_ADLER32Final,
+ (php_hash_copy_func_t) PHP_ADLER32Copy,
4, /* what to say here? */
4,
sizeof(PHP_ADLER32_CTX)