summaryrefslogtreecommitdiff
path: root/ext/dl/dl.h
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-12 19:54:10 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-12 19:54:10 +0000
commit88cc3b3954760d5e2f826310bf021f8e88335eab (patch)
tree91edcbaec9aa339737731aace2289516b06b8d02 /ext/dl/dl.h
parentbe122d47beca0e3b448276f1208850a96bf62b35 (diff)
cast to long from char, short and int in ASM_PUSH_XXXX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/dl.h')
-rw-r--r--ext/dl/dl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/dl/dl.h b/ext/dl/dl.h
index ceee8c5384..5068fc6bbc 100644
--- a/ext/dl/dl.h
+++ b/ext/dl/dl.h
@@ -161,9 +161,9 @@
#elif defined(USE_DLSTACK)
# define ASM_START(sym)
# define ASM_END(sym)
-# define ASM_PUSH_C(x) memcpy(sp,&x,1); sp++;
-# define ASM_PUSH_H(x) memcpy(sp,&x,sizeof(short)); sp++;
-# define ASM_PUSH_I(x) memcpy(sp,&x,sizeof(int)); sp++;
+# define ASM_PUSH_C(x) {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}
+# define ASM_PUSH_H(x) {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}
+# define ASM_PUSH_I(x) {long v=(long)x; memcpy(sp,&v,sizeof(long)); sp++;}
# define ASM_PUSH_L(x) memcpy(sp,&x,sizeof(long)); sp++;
# define ASM_PUSH_P(x) memcpy(sp,&x,sizeof(void*)); sp++;
# define ASM_PUSH_F(x) memcpy(sp,&x,sizeof(float)); sp+=sizeof(float)/sizeof(long);