Skip to content

Commit 2996504

Browse files
author
matz
committed
rb_exec_end_proc, etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 8a4cbc7 commit 2996504

File tree

14 files changed

+338
-321
lines changed

14 files changed

+338
-321
lines changed

ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
Tue Jun 1 15:29:33 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
2+
3+
* version.h (RUBY_RELEASE_CODE): integer macro contant for source
4+
version detection.
5+
6+
Sun May 30 22:19:12 1999 Kenji Nagasawa <kenn@tcp-ip.or.jp>
7+
8+
* ext/socket/socket.c: emx/gcc 0.9d now fixes things about
9+
AF_UNIX.
10+
11+
* process.c: OS/2 EMX kludge.
12+
13+
* Makefile.in (strncasecmp.o): added dependency.
14+
115
Mon May 31 16:06:28 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
216

317
* version 1.3.4 - preliminary release for 1.4

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ sample/tsvr.rb
214214
sample/uumerge.rb
215215
win32/Makefile
216216
win32/config.h
217+
win32/config.status
217218
win32/ntsetup.bat
218219
win32/ruby.def
219220
win32/sdbm.c

Makefile.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ vsnprintf.o: @srcdir@/missing/vsnprintf.c
179179
strcasecmp.o: @srcdir@/missing/strcasecmp.c
180180
$(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/strcasecmp.c
181181

182+
strncasecmp.o: @srcdir@/missing/strncasecmp.c
183+
$(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/strncasecmp.c
184+
182185
strchr.o: @srcdir@/missing/strchr.c
183186
$(CC) $(CFLAGS) $(CPPFLAGS) -c @srcdir@/missing/strchr.c
184187

config_h.dj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@
6868
#define RUBY_SITE_LIB "/usr/local/lib/ruby/1.3/site_ruby"
6969
#define RUBY_PLATFORM "i386-djgpp"
7070
#define RUBY_ARCHLIB "/usr/local/lib/ruby/1.3/i386-djgpp"
71-
#define RUBY_SITE_ARCHLIB "/usr/local/lib/1.3/ruby/site_ruby/i386-djgpp"
71+
#define RUBY_SITE_ARCHLIB "/usr/local/lib/ruby/1.3/site_ruby/i386-djgpp"

eval.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -973,8 +973,6 @@ static void rb_thread_wait_other_threads _((void));
973973

974974
static int exit_status;
975975

976-
static void exec_end_proc _((void));
977-
978976
void
979977
ruby_run()
980978
{
@@ -1057,7 +1055,7 @@ ruby_run()
10571055
rb_bug("Unknown longjmp status %d", ex);
10581056
break;
10591057
}
1060-
exec_end_proc();
1058+
rb_exec_end_proc();
10611059
rb_gc_call_finalizer_at_exit();
10621060
exit(ex);
10631061
}
@@ -2954,7 +2952,8 @@ rb_exit(status)
29542952
exit_status = status;
29552953
rb_exc_raise(rb_exc_new(rb_eSystemExit, 0, 0));
29562954
}
2957-
exec_end_proc();
2955+
rb_exec_end_proc();
2956+
rb_gc_call_finalizer_at_exit();
29582957
exit(status);
29592958
}
29602959

@@ -5114,16 +5113,20 @@ rb_f_at_exit()
51145113
return proc;
51155114
}
51165115

5117-
static void
5118-
exec_end_proc()
5116+
void
5117+
rb_exec_end_proc()
51195118
{
51205119
struct end_proc_data *link = end_proc_data;
5120+
struct end_proc_data *tmp;
51215121
int status;
51225122

51235123
while (link) {
51245124
rb_protect((VALUE(*)())link->func, link->data, &status);
5125-
link = link->next;
5125+
tmp = link->next;
5126+
free(link);
5127+
link = tmp;
51265128
}
5129+
end_proc_data = 0;
51275130
}
51285131

51295132
void

ext/socket/socket.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
#include <netdb.h>
2020
#endif
2121
#include <errno.h>
22-
#ifdef __EMX__
23-
#undef HAVE_SYS_UN_H
24-
#endif
2522
#ifdef HAVE_SYS_UN_H
2623
#include <sys/un.h>
2724
#endif

intern.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ VALUE rb_class_new_instance _((int, VALUE*, VALUE));
121121
VALUE rb_f_lambda _((void));
122122
VALUE rb_protect _((VALUE (*)(), VALUE, int*));
123123
void rb_set_end_proc _((void (*)(), VALUE));
124+
void rb_exec_end_proc _((void));
124125
void rb_gc_mark_threads _((void));
125126
void rb_thread_start_timer _((void));
126127
void rb_thread_stop_timer _((void));

lib/tempfile.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def initialize(basename, tmpdir = nil)
3838
tmpdir ||= ENV['TMPDIR'] || ENV['TMP'] || ENV['TEMP'] || '/tmp'
3939
tmpname = sprintf('%s/%s.%d.%d', tmpdir, basename, $$, n)
4040
lock = tmpname + '.lock'
41-
unless File.exist?(lock)
41+
unless File.exist?(tmpname) or File.exist?(lock)
4242
Dir.mkdir(lock)
4343
break
4444
end
@@ -79,6 +79,10 @@ def close(real=false)
7979
ObjectSpace.undefine_finalizer(self)
8080
end
8181
end
82+
83+
def path
84+
@tmpname
85+
end
8286
end
8387

8488
if __FILE__ == $0

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy