diff options
author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-10 07:52:10 +0000 |
---|---|---|
committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-10 07:52:10 +0000 |
commit | abca067fb6d572ee45c585a43dbdfc153ce9f14f (patch) | |
tree | b071a23a2dddf927e5c76732db86f865978e0d54 /ext/dl/dl.c | |
parent | 48bd82e993ed91d011bea2c9b2815488c4b9574b (diff) | |
download | ruby-abca067fb6d572ee45c585a43dbdfc153ce9f14f.tar.gz |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c index e704a6d4a0..935ae33e32 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); } |