Skip to content
This repository
Browse code

remove historical dlog variables + misc cleanup

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4250 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
commit 21174f33afc9c37850c9df5b33473fb7b0a9dc86 1 parent 8d7a21b
Laurent Sansonetti authored

Showing 2 changed files with 4 additions and 24 deletions. Show diff stats Hide diff stats

  1. +2 2 MacRuby.m
  2. +2 22 eval.c
4 MacRuby.m
@@ -16,14 +16,14 @@
16 16
17 17 @implementation MacRuby
18 18
19   -extern int ruby_initialized;
  19 +extern bool ruby_initialized;
20 20
21 21 + (MacRuby *)sharedRuntime
22 22 {
23 23 static MacRuby *runtime = nil;
24 24 if (runtime == nil) {
25 25 runtime = [[MacRuby alloc] init];
26   - if (ruby_initialized == 0) {
  26 + if (!ruby_initialized) {
27 27 int argc = 0;
28 28 char **argv = NULL;
29 29 ruby_sysinit(&argc, &argv);
24 eval.c
@@ -43,10 +43,7 @@ void Init_PreClass(void);
43 43 void Init_PreGCD(void);
44 44 void Init_PreEncoding(void);
45 45
46   -bool ruby_dlog_enabled = false;
47   -FILE *ruby_dlog_file = NULL;
48   -
49   -int ruby_initialized = 0;
  46 +bool ruby_initialized = false;
50 47
51 48 void
52 49 ruby_init(void)
@@ -54,27 +51,10 @@ ruby_init(void)
54 51 if (ruby_initialized) {
55 52 return;
56 53 }
57   - ruby_initialized = 1;
  54 + ruby_initialized = true;
58 55
59 56 rb_origenviron = environ;
60 57
61   - char *s;
62   -
63   - s = getenv("MACRUBY_DEBUG");
64   - ruby_dlog_enabled = !(s == NULL || *s == '0');
65   - s = getenv("MACRUBY_DEBUG_FILE");
66   - if (s == NULL) {
67   - ruby_dlog_file = stderr;
68   - }
69   - else {
70   - ruby_dlog_file = fopen(s, "w");
71   - if (ruby_dlog_file == NULL) {
72   - fprintf(stderr, "cannot open macruby debug file `%s'",
73   - strerror(errno));
74   - ruby_dlog_file = stderr;
75   - }
76   - }
77   -
78 58 Init_PreClass(); // requires nothing
79 59 Init_PreGC(); // requires nothing
80 60 Init_PreVM(); // requires nothing

0 comments on commit 21174f3

Please sign in to comment.
Something went wrong with that request. Please try again.