From: Michal Rokos Date: 2002-09-04T18:19:53+09:00 Subject: [CVS] Fix rb_digest_base_become Hi, I don't know what's the practice when I want commit something to CVS. Shall I post diff to ruby-lang, write directly author, or just commit it? My current practice is to post it to ruby-core and if somebody from real Ruby hackers write that it is OK, commit it to CVS. But, because of 9 hour offset, I feel it very painfull (I have to wait 1 day to get a reply.) So... - any ideas? Michal PS: This will be commited to CVS: Index: ext/digest/digest.c =================================================================== RCS file: /src/ruby/ext/digest/digest.c,v retrieving revision 1.5 diff -u -p -r1.5 digest.c --- ext/digest/digest.c 2002/09/04 06:37:37 1.5 +++ ext/digest/digest.c 2002/09/04 09:12:23 @@ -147,15 +147,14 @@ rb_digest_base_become(copy, obj) { algo_t *algo; void *pctx1, *pctx2; - VALUE klass; if (copy = obj) return copy; rb_check_frozen(copy); - algo = get_digest_base_metadata(CLASS_OF(klass)); + algo = get_digest_base_metadata(CLASS_OF(copy)); if (algo != get_digest_base_metadata(CLASS_OF(obj))) { rb_raise(rb_eTypeError, "wrong argument class"); } - Data_Get_Struct(copy, void, pctx1); + Data_Get_Struct(obj, void, pctx1); Data_Get_Struct(copy, void, pctx2); memcpy(pctx2, pctx1, algo->ctx_size); -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Michal Rokos Czech Technical University, Prague E-mail:m.rokos@sh.cvut.cz ICQ:36118339 Jabber:majkl@jabber.cz -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-