summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-11-26 08:25:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-11-26 08:25:51 +0000
commit11187ce939d94c3a2f6d9239114c2696a8271834 (patch)
treecfa74a6ea96d9652aae8da349eec2da41b2aca64
parent8271cacad706ed0d7741889faebb0c19270b8370 (diff)
1.1c9 - 1.1c final, hopefully
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog16
-rw-r--r--MANIFEST21
-rw-r--r--beos/ruby.def.in2
-rw-r--r--ext/Setup2
-rw-r--r--ext/extmk.rb.in15
-rw-r--r--ext/md5/md5init.c4
-rw-r--r--ext/tk/MANIFEST3
-rw-r--r--intern.h1
-rw-r--r--io.c6
-rw-r--r--missing/nt.c17
-rw-r--r--parse.y4
-rw-r--r--re.h1
-rw-r--r--sample/ruby-mode.el12
-rw-r--r--time.c4
-rw-r--r--version.h4
15 files changed, 62 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index 94134535a5..b60d6ada2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+Wed Nov 25 13:07:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * parse.y (yycompile): reduce known memory leak (hard to remove).
+
+Sat Nov 21 18:44:06 1998 Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>
+
+ * time.c (time_s_now): had memory leak.
+
+ * ext/md5/md5init.c (md5_new): had memory leak.
+
+ * ext/md5/md5init.c (md5_clone): ditto.
+
+Wed Nov 18 10:48:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * io.c (read_all): SEGV on large files.
+
Tue Nov 17 18:11:20 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* version 1.1c8 released.
diff --git a/MANIFEST b/MANIFEST
index 95dc640c53..9a354082fa 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -129,20 +129,6 @@ lib/tempfile.rb
lib/thread.rb
lib/thwait.rb
lib/timeout.rb
-lib/tk.rb
-lib/tkafter.rb
-lib/tkbgerror.rb
-lib/tkcanvas.rb
-lib/tkclass.rb
-lib/tkdialog.rb
-lib/tkentry.rb
-lib/tkfont.rb
-lib/tkmenubar.rb
-lib/tkmngfocus.rb
-lib/tkpalette.rb
-lib/tkscrollbox.rb
-lib/tktext.rb
-lib/tkvirtevent.rb
lib/tracer.rb
lib/weakref.rb
missing/alloca.c
@@ -215,13 +201,6 @@ sample/sieve.rb
sample/svr.rb
sample/test.rb
sample/time.rb
-sample/tkbiff.rb
-sample/tkbrowse.rb
-sample/tkdialog.rb
-sample/tkfrom.rb
-sample/tkhello.rb
-sample/tkline.rb
-sample/tktimer.rb
sample/trojan.rb
sample/tsvr.rb
sample/uumerge.rb
diff --git a/beos/ruby.def.in b/beos/ruby.def.in
index 04de159208..cad42a4ae6 100644
--- a/beos/ruby.def.in
+++ b/beos/ruby.def.in
@@ -134,7 +134,6 @@ io_write
iterator_p
lastline_get
lastline_set
-local_var_append
memclear
mod_constants
module_new
@@ -264,7 +263,6 @@ rb_type
rb_undef_method
rb_yield
rb_yield_0
-reg_free
reg_last_match
reg_match
reg_match2
diff --git a/ext/Setup b/ext/Setup
index b6917e5d32..9e3a2474c3 100644
--- a/ext/Setup
+++ b/ext/Setup
@@ -7,7 +7,7 @@
#fcntl
#kconv
#md5
-socket
+#socket
#tkutil
#tcltklib
#gtk
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index dbb453df60..b60951538d 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -304,7 +304,7 @@ archdir = $(pkglibdir)/@arch@
mfile.printf "OBJS = "
if !$objs then
$objs = []
- for f in Dir["#{$top_srcdir}/ext/#{target}/*.{c,cc}"]
+ for f in Dir["#{$top_srcdir}/ext/#{$mdir}/*.{c,cc}"]
f = File.basename(f)
f.sub!(/\.(c|cc)$/, ".o")
$objs.push f
@@ -323,7 +323,7 @@ binsuffix = @binsuffix@
all: $(TARGET)
-clean:; @rm -f *.o *.so *.sl
+clean:; @rm -f *.o *.a *.so *.sl
@rm -f Makefile extconf.h conftest.*
@rm -f core ruby$(binsuffix) *~
@@ -350,7 +350,7 @@ install:
mfile.printf "\
$(TARGET): $(OBJS)
@AR@ cru $(TARGET) $(OBJS)
- @-@RANLIB@ $(LIBRUBY) 2> /dev/null || true
+ @-@RANLIB@ $(TARGET) 2> /dev/null || true
"
elsif "@DLEXT@" != "o"
mfile.printf "\
@@ -416,8 +416,9 @@ def extmake(target)
$LDFLAGS = nil
begin
- system "mkdir " + target unless File.directory?(target)
+ system "mkdir", target unless File.directory?(target)
Dir.chdir target
+ $mdir = target
if $static_ext.size > 0 ||
!File.exist?("./Makefile") ||
older("./Makefile", "#{$top_srcdir}/ext/@setup@") ||
@@ -541,7 +542,11 @@ if $extlist.size > 0
`rm -f ruby@binsuffix@`
end
- $extobjs = "ext/extinit.o " + $extobjs
+ if $extobjs
+ $extobjs = "ext/extinit.o " + $extobjs
+ else
+ $extobjs = "ext/extinit.o "
+ end
if PLATFORM =~ /m68k-human|beos/
$extlibs.gsub!("-L/usr/local/lib", "") if $extlibs
end
diff --git a/ext/md5/md5init.c b/ext/md5/md5init.c
index 65fd996ca9..ab29935c41 100644
--- a/ext/md5/md5init.c
+++ b/ext/md5/md5init.c
@@ -53,7 +53,7 @@ md5_clone(obj)
MD5_CTX *md5, *md5_new;
Data_Get_Struct(obj, MD5_CTX, md5);
- obj = Data_Make_Struct(CLASS_OF(obj), MD5_CTX, 0, 0, md5_new);
+ obj = Data_Make_Struct(CLASS_OF(obj), MD5_CTX, 0, free, md5_new);
*md5_new = *md5;
return obj;
@@ -72,7 +72,7 @@ md5_new(argc, argv, class)
rb_scan_args(argc, argv, "01", &arg);
if (!NIL_P(arg)) Check_Type(arg, T_STRING);
- obj = Data_Make_Struct(class, MD5_CTX, 0, 0, md5);
+ obj = Data_Make_Struct(class, MD5_CTX, 0, free, md5);
MD5Init(md5);
if (!NIL_P(arg)) {
md5_update(obj, arg);
diff --git a/ext/tk/MANIFEST b/ext/tk/MANIFEST
index 5096f900c7..9689186bf0 100644
--- a/ext/tk/MANIFEST
+++ b/ext/tk/MANIFEST
@@ -1,6 +1,7 @@
MANIFEST
-tkutil.c
+extconf.rb
depend
+tkutil.c
lib/tk.rb
lib/tkafter.rb
lib/tkbgerror.rb
diff --git a/intern.h b/intern.h
index e76a7a0c0f..35c599788c 100644
--- a/intern.h
+++ b/intern.h
@@ -200,7 +200,6 @@ void yyappend_print _((void));
void yywhile_loop _((int, int));
int rb_is_const_id _((ID));
int rb_is_instance_id _((ID));
-void local_var_append _((ID));
VALUE backref_get _((void));
void backref_set _((VALUE));
VALUE lastline_get _((void));
diff --git a/io.c b/io.c
index 34f0ec3a95..fd74c450e2 100644
--- a/io.c
+++ b/io.c
@@ -370,7 +370,6 @@ read_all(port)
GetOpenFile(port, fptr);
io_readable(fptr);
- str = str_new(0, siz);
if (fstat(fileno(fptr->f), &st) == 0 && S_ISREG(st.st_mode)
#ifdef __BEOS__
&& (st.st_dev > 3)
@@ -385,6 +384,7 @@ read_all(port)
}
}
}
+ str = str_new(0, siz);
for (;;) {
READ_CHECK(fptr->f);
TRAP_BEG;
@@ -2455,12 +2455,12 @@ arg_read(argc, argv)
retry:
if (!next_argv()) return str;
tmp = io_read(argc, argv, file);
- if (NIL_P(tmp) && next_p != -1) {
+ if ((NIL_P(tmp) || RSTRING(tmp)->len == 0) && next_p != -1) {
io_close(file);
next_p = 1;
goto retry;
}
- if (NIL_P(tmp)) return str;
+ if (NIL_P(tmp) || RSTRING(tmp)->len == 0) return str;
else if (NIL_P(str)) str = tmp;
else str_cat(str, RSTRING(tmp)->ptr, RSTRING(tmp)->len);
if (argc == 0) {
diff --git a/missing/nt.c b/missing/nt.c
index 55f4c4d93c..029dd31d16 100644
--- a/missing/nt.c
+++ b/missing/nt.c
@@ -251,6 +251,9 @@ int SafeFree(char **vec, int vecc)
static char *szInternalCmds[] = {
+ "append",
+ "break",
+ "call",
"cd",
"chdir",
"cls",
@@ -264,6 +267,7 @@ static char *szInternalCmds[] = {
"md",
"mkdir",
"path",
+ "pause",
"rd",
"rem",
"ren",
@@ -280,13 +284,18 @@ static char *szInternalCmds[] = {
int
isInternalCmd(char *cmd)
{
- int fRet;
+ int i, fRet;
char **vec;
- int vecc = NtMakeCmdVector(cmd, &vec, FALSE);
-
+ for( i = 0; szInternalCmds[i] ; i++){
+ if(!strcmp(szInternalCmds[i], vec[0])){
+ fRet = 1;
+ break;
+ }
+ }
+
SafeFree (vec, vecc);
- return 0;
+ return fRet;
}
diff --git a/parse.y b/parse.y
index c41e5e2661..825917f8be 100644
--- a/parse.y
+++ b/parse.y
@@ -1653,7 +1653,7 @@ yycompile(f)
eval_tree = 0;
newline_seen = 0;
- sourcefile = strdup(f);
+ sourcefile = f;
rb_in_compile = 1;
n = yyparse();
rb_in_compile = 0;
@@ -1686,7 +1686,7 @@ compile_file(f, file, start)
lex_pbeg = lex_p = lex_pend = 0;
sourceline = start;
- return yycompile(f);
+ return yycompile(strdup(f));
}
static int
diff --git a/re.h b/re.h
index bfc60d9fa5..530e8f7177 100644
--- a/re.h
+++ b/re.h
@@ -33,5 +33,4 @@ int str_cicmp _((VALUE, VALUE));
VALUE reg_regcomp _((VALUE));
int reg_search _((VALUE, VALUE, int, int));
VALUE reg_regsub _((VALUE, VALUE, struct re_registers *));
-void reg_free _((Regexp *));
#endif
diff --git a/sample/ruby-mode.el b/sample/ruby-mode.el
index 254851b782..8bf843c1ea 100644
--- a/sample/ruby-mode.el
+++ b/sample/ruby-mode.el
@@ -142,7 +142,7 @@ The variable ruby-indent-level controls the amount of indentation.
(interactive)
(kill-all-local-variables)
(use-local-map ruby-mode-map)
- (setq mode-name "ruby")
+ (setq mode-name "Ruby")
(setq major-mode 'ruby-mode)
(ruby-mode-variables)
(run-hooks 'ruby-mode-hook))
@@ -209,7 +209,7 @@ The variable ruby-indent-level controls the amount of indentation.
(looking-at ruby-block-mid-re))
(progn
(goto-char (match-end 0))
- (looking-at "[^_]")))))))))
+ (looking-at "\\>")))))))))
(defun ruby-parse-region (start end)
(let ((indent-point end)
@@ -464,6 +464,12 @@ The variable ruby-indent-level controls the amount of indentation.
(setq bol (point))
(end-of-line)
(skip-chars-backward " \t")
+ (and (re-search-backward "#" (save-excursion
+ (beginning-of-line)
+ (point)) t)
+ (setq state (ruby-parse-region parse-start (point)))
+ (nth 0 state)
+ (goto-char (nth 0 state)))
(or (bobp) (forward-char -1))
(and
(or (and (looking-at ruby-symbol-re)
@@ -473,7 +479,7 @@ The variable ruby-indent-level controls the amount of indentation.
(goto-char (match-end 0))
(not (looking-at "[a-z_]"))))
(and (looking-at ruby-operator-re)
- (or (not (or (eq ?/ (char-after (point)))))
+ (or (not (eq ?/ (char-after (point))))
(null (nth 0 (ruby-parse-region parse-start (point)))))
(not (eq (char-after (1- (point))) ?$))
(or (not (eq ?| (char-after (point))))
diff --git a/time.c b/time.c
index 460d6ae5ee..8f595520fd 100644
--- a/time.c
+++ b/time.c
@@ -60,7 +60,7 @@ time_s_now(klass)
VALUE obj;
struct time_object *tobj;
- obj = Data_Make_Struct(klass, struct time_object, 0, 0, tobj);
+ obj = Data_Make_Struct(klass, struct time_object, 0, free, tobj);
tobj->tm_got=0;
if (gettimeofday(&(tobj->tv), 0) == -1) {
@@ -79,7 +79,7 @@ time_new_internal(klass, sec, usec)
VALUE obj;
struct time_object *tobj;
- obj = Data_Make_Struct(klass, struct time_object, 0, 0, tobj);
+ obj = Data_Make_Struct(klass, struct time_object, 0, free, tobj);
tobj->tm_got = 0;
tobj->tv.tv_sec = sec;
tobj->tv.tv_usec = usec;
diff --git a/version.h b/version.h
index 9fa343480c..5cbe0055d9 100644
--- a/version.h
+++ b/version.h
@@ -1,2 +1,2 @@
-#define RUBY_VERSION "1.1c8"
-#define VERSION_DATE "98/11/17"
+#define RUBY_VERSION "1.1c9"
+#define VERSION_DATE "98/11/26"