summaryrefslogtreecommitdiffhomepage
path: root/src/pack.c
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2013-11-05 18:31:15 -0800
committerTomoyuki Sahara <[email protected]>2013-11-05 18:31:15 -0800
commite96cdeb2afe021815c6318b02e9d23d6f113cad0 (patch)
treea0984e01f801637b4c0e75d578ae17d6561eb132 /src/pack.c
parent38f4086a52bbdcf27018f000c36ab72bd5402a92 (diff)
parentdb14b8e7d4a1c8a6a8bdbe7dad0850e0ee1bbc87 (diff)
downloadmruby-e96cdeb2afe021815c6318b02e9d23d6f113cad0.tar.gz
mruby-e96cdeb2afe021815c6318b02e9d23d6f113cad0.zip
Merge pull request #3 from h2so5/patch-1
avoid declaration error on VC++
Diffstat (limited to 'src/pack.c')
-rw-r--r--src/pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pack.c b/src/pack.c
index e28c0ca73..7d68dd338 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -193,9 +193,9 @@ pack_double(mrb_state *mrb, mrb_value o, mrb_value str, mrb_int sidx, unsigned i
{
int i;
double d;
+ uint8_t *buffer = (uint8_t *)&d;
str = str_len_ensure(mrb, str, sidx + 8);
d = mrb_float(o);
- uint8_t *buffer = (uint8_t *)&d;
#ifdef MRB_ENDIAN_BIG
#error unsupported