зеркало из https://github.com/github/ruby.git
* ext/bigdecimal/bigdecimal.c (BigDecimal_load): Silence warnings
regarding char * vs. unsigned char * mismatch; submitted by Lyle Johnson <lyle.johnson@gmail.com> in [ruby-core:10416]. * ext/digest/sha1/sha1ossl.c (SHA1_Finish): Ditto. * ext/digest/rmd160/rmd160ossl.c (RMD160_Finish): Ditto. * ext/digest/digest.c (rb_digest_base_finish, rb_digest_base_update): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
60c3c901fe
Коммит
0e6521aa5d
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
Tue Feb 27 18:59:42 2007 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c (BigDecimal_load): Silence warnings
|
||||
regarding char * vs. unsigned char * mismatch; submitted by Lyle
|
||||
Johnson <lyle.johnson@gmail.com> in [ruby-core:10416].
|
||||
|
||||
* ext/digest/sha1/sha1ossl.c (SHA1_Finish): Ditto.
|
||||
|
||||
* ext/digest/rmd160/rmd160ossl.c (RMD160_Finish): Ditto.
|
||||
|
||||
* ext/digest/digest.c (rb_digest_base_finish,
|
||||
rb_digest_base_update): Ditto.
|
||||
|
||||
Tue Feb 27 18:12:05 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* enum.c (enum_take): new method. [ruby-dev:30407]
|
||||
|
|
|
@ -332,7 +332,7 @@ BigDecimal_load(VALUE self, VALUE str)
|
|||
unsigned long m=0;
|
||||
|
||||
SafeStringValue(str);
|
||||
pch = RSTRING_PTR(str);
|
||||
pch = (unsigned char *)RSTRING_PTR(str);
|
||||
/* First get max prec */
|
||||
while((*pch)!=(unsigned char)'\0' && (ch=*pch++)!=(unsigned char)':') {
|
||||
if(!ISDIGIT(ch)) {
|
||||
|
@ -341,7 +341,7 @@ BigDecimal_load(VALUE self, VALUE str)
|
|||
m = m*10 + (unsigned long)(ch-'0');
|
||||
}
|
||||
if(m>VpBaseFig()) m -= VpBaseFig();
|
||||
GUARD_OBJ(pv,VpNewRbClass(m,pch,self));
|
||||
GUARD_OBJ(pv,VpNewRbClass(m,(char *)pch,self));
|
||||
m /= VpBaseFig();
|
||||
if(m && pv->MaxPrec>m) pv->MaxPrec = m+1;
|
||||
return ToValue(pv);
|
||||
|
|
|
@ -519,7 +519,7 @@ rb_digest_base_update(VALUE self, VALUE str)
|
|||
Data_Get_Struct(self, void, pctx);
|
||||
|
||||
StringValue(str);
|
||||
algo->update_func(pctx, RSTRING_PTR(str), RSTRING_LEN(str));
|
||||
algo->update_func(pctx, (unsigned char *)RSTRING_PTR(str), RSTRING_LEN(str));
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -537,7 +537,7 @@ rb_digest_base_finish(VALUE self)
|
|||
Data_Get_Struct(self, void, pctx);
|
||||
|
||||
str = rb_str_new(0, algo->digest_len);
|
||||
algo->finish_func(pctx, RSTRING_PTR(str));
|
||||
algo->finish_func(pctx, (unsigned char *)RSTRING_PTR(str));
|
||||
|
||||
/* avoid potential coredump caused by use of a finished context */
|
||||
algo->init_func(pctx);
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
#include "rmd160ossl.h"
|
||||
|
||||
void RMD160_Finish(RMD160_CTX *ctx, char *buf) {
|
||||
RIPEMD160_Final(buf, ctx);
|
||||
RIPEMD160_Final((unsigned char *)buf, ctx);
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
void
|
||||
SHA1_Finish(SHA1_CTX *ctx, char *buf)
|
||||
{
|
||||
SHA1_Final(buf, ctx);
|
||||
SHA1_Final((unsigned char *)buf, ctx);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче