1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2014-07-15 14:58:53 +00:00
parent a3f50234bc
commit 6046b9f149
3 changed files with 21 additions and 7 deletions

View file

@ -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;