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

* ext/dl/dl.h (DLALIGN): round up at once and get rid of overflow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-02-09 16:29:08 +00:00
parent 5ee0135a2f
commit 196151158f
2 changed files with 6 additions and 3 deletions

View file

@ -1,3 +1,7 @@
Fri Feb 10 01:29:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dl/dl.h (DLALIGN): round up at once and get rid of overflow.
Fri Feb 10 00:47:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* test/ruby/envutil.rb (assert_no_memory_leak): new assertion to

View file

@ -155,9 +155,8 @@ typedef struct { char c; LONG_LONG x; } s_long_long;
#define ALIGN_FLOAT (sizeof(s_float) - sizeof(float))
#define ALIGN_DOUBLE (sizeof(s_double) - sizeof(double))
#define DLALIGN(ptr,offset,align) {\
while( (((unsigned long)((char *)(ptr) + (offset))) % (align)) != 0 ) (offset)++;\
}
#define DLALIGN(ptr,offset,align) \
((offset) += ((align) - ((uintptr_t)((char *)(ptr) + (offset))) % (align)) % (align))
#define DLTYPE_VOID 0