diff options
author | Yukihiro Matsumoto <[email protected]> | 1997-10-03 10:51:10 +0900 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2019-08-17 22:09:33 +0900 |
commit | 7ad198827b6029d5338c6a2dfe68248da25e9db5 (patch) | |
tree | 2fc097b92bcbb5daba091852b40ef1c2640bb457 /ext/marshal/marshal.c | |
parent | 10d21745c8c1c3c78678ea7e0b62c0a7433ccfce (diff) |
version 1.0-971003v1_0_971003
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-1.0-971003.tar.gz
Fri Oct 3 10:51:10 1997 Yukihiro Matsumoto <[email protected]>
* version 1.0-971003
* eval.c (ruby_options): f_require() called too early.
* eval.c (rb_provide): module extentions should always be `.o'.
Diffstat (limited to 'ext/marshal/marshal.c')
-rw-r--r-- | ext/marshal/marshal.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ext/marshal/marshal.c b/ext/marshal/marshal.c index 47cb0fcd2a..a74ecd70eb 100644 --- a/ext/marshal/marshal.c +++ b/ext/marshal/marshal.c @@ -620,7 +620,9 @@ r_object(arg) case TYPE_FLOAT: { +#ifndef atof double atof(); +#endif char *buf; r_bytes(buf, arg); @@ -695,15 +697,17 @@ r_object(arg) len = r_long(arg); values = ary_new2(len); - i = 0; + for (i=0; i<len; i++) { + ary_push(values, Qnil); + } + v = struct_alloc(class, values); + r_regist(v, arg); for (i=0; i<len; i++) { ID slot = r_symbol(arg); if (RARRAY(mem)->ptr[i] != INT2FIX(slot)) TypeError("struct not compatible"); - ary_push(values, r_object(arg)); + struct_aset(v, INT2FIX(i), r_object(arg)); } - v = struct_alloc(class, values); - st_insert(arg->data, num, v); /* re-regist */ return v; } break; |