mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Merge r35953 from ruby_1_8_7.
* ext/bigdecimal/bigdecimal.c (VpMemAlloc): Fixes a bug reported by Drew Yao <ayao at apple.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@37219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7eb8872b9a
commit
4928543d61
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Oct 16 16:51:08 2012 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/bigdecimal/bigdecimal.c (VpMemAlloc): Fixes a bug reported
|
||||
by Drew Yao <ayao at apple.com>
|
||||
|
||||
Tue Oct 16 16:30:50 2012 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/openssl/ossl_x509store.c (ossl_x509store_initialize): initialize
|
||||
|
|
|
@ -2061,11 +2061,11 @@ static int gnAlloc=0; /* Memory allocation counter */
|
|||
VP_EXPORT void *
|
||||
VpMemAlloc(U_LONG mb)
|
||||
{
|
||||
void *p = xmalloc((unsigned int)mb);
|
||||
if(!p) {
|
||||
VpException(VP_EXCEPTION_MEMORY,"failed to allocate memory",1);
|
||||
void *p = xmalloc(mb);
|
||||
if (!p) {
|
||||
VpException(VP_EXCEPTION_MEMORY, "failed to allocate memory", 1);
|
||||
}
|
||||
memset(p,0,mb);
|
||||
memset(p, 0, mb);
|
||||
#ifdef _DEBUG
|
||||
gnAlloc++; /* Count allocation call */
|
||||
#endif /* _DEBUG */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue