summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorYukihiro Matsumoto <matz@ruby-lang.org>1997-10-03 10:51:10 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-17 22:09:33 +0900
commit7ad198827b6029d5338c6a2dfe68248da25e9db5 (patch)
tree2fc097b92bcbb5daba091852b40ef1c2640bb457 /ext
parent10d21745c8c1c3c78678ea7e0b62c0a7433ccfce (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 <matz@netlab.co.jp> * 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')
-rw-r--r--ext/extmk.rb.in2
-rw-r--r--ext/marshal/marshal.c12
2 files changed, 9 insertions, 5 deletions
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index f1acef5608..80e2a3c9d1 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -243,7 +243,7 @@ libdir = @libdir@/ruby/@arch@
mfile.printf $objs.join(" ")
mfile.printf "\n"
- dots = if "@INSTALL@" =~ /^\// then "" else "#{$topdir}/" end
+ dots = if "@INSTALL@" =~ /^\// then "" else "#{$topdir}/ext" end
mfile.printf "\
TARGET = %s.%s
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;