summaryrefslogtreecommitdiff
path: root/ext/dl/dl.c
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-10 07:52:10 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-10 07:52:10 +0000
commitabca067fb6d572ee45c585a43dbdfc153ce9f14f (patch)
treeb071a23a2dddf927e5c76732db86f865978e0d54 /ext/dl/dl.c
parent48bd82e993ed91d011bea2c9b2815488c4b9574b (diff)
dl.c (rb_dl_scan_callback_args): memcpy() -> cast and substitution
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/dl.c')
-rw-r--r--ext/dl/dl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c
index e704a6d4a05..935ae33e323 100644
--- a/ext/dl/dl.c
+++ b/ext/dl/dl.c
@@ -28,7 +28,7 @@ rb_dl_scan_callback_args(long stack[], const char *proto,
case 'C':
{
char v;
- memcpy(&v, sp, sizeof(long));
+ v = (char)(*sp);
sp++;
val = INT2NUM(v);
}
@@ -36,7 +36,7 @@ rb_dl_scan_callback_args(long stack[], const char *proto,
case 'H':
{
short v;
- memcpy(&v, sp, sizeof(long));
+ v = (short)(*sp);
sp++;
val = INT2NUM(v);
}
@@ -44,7 +44,7 @@ rb_dl_scan_callback_args(long stack[], const char *proto,
case 'I':
{
int v;
- memcpy(&v, sp, sizeof(long));
+ v = (int)(*sp);
sp++;
val = INT2NUM(v);
}
@@ -52,7 +52,7 @@ rb_dl_scan_callback_args(long stack[], const char *proto,
case 'L':
{
long v;
- memcpy(&v, sp, sizeof(long));
+ v = (long)(*sp);
sp++;
val = INT2NUM(v);
}