Permalink
Browse files

Merge pull request #8 from qqshfox/fix_write_time_for_x86

fix write_time for 32bit platform
  • Loading branch information...
2 parents 9e80f0a + f8e7182 commit 419c525fea84eda8643e6114c3be35af6b25fa7a @warhammerkid warhammerkid committed Nov 20, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 ext/rocketamf_ext/serializer.c
@@ -229,8 +229,8 @@ static VALUE ser0_write_time(VALUE self, VALUE time) {
// Write time
time = rb_obj_dup(time);
rb_funcall(time, id_utc, 0);
- long tmp_num = NUM2DBL(rb_funcall(time, id_to_f, 0)) * 1000;
- ser_write_double(ser, (double)tmp_num);
+ double tmp_num = NUM2DBL(rb_funcall(time, id_to_f, 0)) * 1000;
+ ser_write_double(ser, tmp_num);
ser_write_uint16(ser, 0); // Time zone
}
@@ -549,8 +549,8 @@ static VALUE ser3_write_time(VALUE self, VALUE time_obj) {
ser_write_byte(ser, AMF3_NULL_MARKER); // Ref header
time_obj = rb_obj_dup(time_obj);
rb_funcall(time_obj, id_utc, 0);
- long tmp_num = NUM2DBL(rb_funcall(time_obj, id_to_f, 0)) * 1000;
- ser_write_double(ser, (double)tmp_num);
+ double tmp_num = NUM2DBL(rb_funcall(time_obj, id_to_f, 0)) * 1000;
+ ser_write_double(ser, tmp_num);
}
static VALUE ser3_write_date(VALUE self, VALUE date) {

0 comments on commit 419c525

Please sign in to comment.