summaryrefslogtreecommitdiff
path: root/ext/dl/dl.h
diff options
context:
space:
mode:
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 ceee8c53840..5068fc6bbcc 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);