summaryrefslogtreecommitdiff
path: root/ext/digest/digest.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-15 14:58:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-15 14:58:53 +0000
commit6046b9f149ec748a11d7b23c6cf485fb3e079e5a (patch)
treee6bfb9fc90af6808b6b0ba69666c9aa8f1759db0 /ext/digest/digest.h
parenta3f50234bc4cd0dd66c6283495dd3d07da6b48e1 (diff)
digest.c: raise exception on init failure
* ext/digest/digest.c: expect digest init and finish functions to indicate success or failure; raise exception on failure. [ruby-core:61614] [Bug #9659] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/digest.h')
-rw-r--r--ext/digest/digest.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/digest/digest.h b/ext/digest/digest.h
index 6e4906c..85848d5 100644
--- a/ext/digest/digest.h
+++ b/ext/digest/digest.h
@@ -15,11 +15,11 @@
#include "ruby.h"
-#define RUBY_DIGEST_API_VERSION 2
+#define RUBY_DIGEST_API_VERSION 3
-typedef void (*rb_digest_hash_init_func_t)(void *);
+typedef int (*rb_digest_hash_init_func_t)(void *);
typedef void (*rb_digest_hash_update_func_t)(void *, unsigned char *, size_t);
-typedef void (*rb_digest_hash_finish_func_t)(void *, unsigned char *);
+typedef int (*rb_digest_hash_finish_func_t)(void *, unsigned char *);
typedef struct {
int api_version;