[macruby-changes] [4250] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jun 18 19:12:52 PDT 2010
Revision: 4250
http://trac.macosforge.org/projects/ruby/changeset/4250
Author: lsansonetti at apple.com
Date: 2010-06-18 19:12:48 -0700 (Fri, 18 Jun 2010)
Log Message:
-----------
remove historical dlog variables + misc cleanup
Modified Paths:
--------------
MacRuby/trunk/MacRuby.m
MacRuby/trunk/eval.c
Modified: MacRuby/trunk/MacRuby.m
===================================================================
--- MacRuby/trunk/MacRuby.m 2010-06-19 01:33:48 UTC (rev 4249)
+++ MacRuby/trunk/MacRuby.m 2010-06-19 02:12:48 UTC (rev 4250)
@@ -16,14 +16,14 @@
@implementation MacRuby
-extern int ruby_initialized;
+extern bool ruby_initialized;
+ (MacRuby *)sharedRuntime
{
static MacRuby *runtime = nil;
if (runtime == nil) {
runtime = [[MacRuby alloc] init];
- if (ruby_initialized == 0) {
+ if (!ruby_initialized) {
int argc = 0;
char **argv = NULL;
ruby_sysinit(&argc, &argv);
Modified: MacRuby/trunk/eval.c
===================================================================
--- MacRuby/trunk/eval.c 2010-06-19 01:33:48 UTC (rev 4249)
+++ MacRuby/trunk/eval.c 2010-06-19 02:12:48 UTC (rev 4250)
@@ -43,38 +43,18 @@
void Init_PreGCD(void);
void Init_PreEncoding(void);
-bool ruby_dlog_enabled = false;
-FILE *ruby_dlog_file = NULL;
+bool ruby_initialized = false;
-int ruby_initialized = 0;
-
void
ruby_init(void)
{
if (ruby_initialized) {
return;
}
- ruby_initialized = 1;
+ ruby_initialized = true;
rb_origenviron = environ;
- char *s;
-
- s = getenv("MACRUBY_DEBUG");
- ruby_dlog_enabled = !(s == NULL || *s == '0');
- s = getenv("MACRUBY_DEBUG_FILE");
- if (s == NULL) {
- ruby_dlog_file = stderr;
- }
- else {
- ruby_dlog_file = fopen(s, "w");
- if (ruby_dlog_file == NULL) {
- fprintf(stderr, "cannot open macruby debug file `%s'",
- strerror(errno));
- ruby_dlog_file = stderr;
- }
- }
-
Init_PreClass(); // requires nothing
Init_PreGC(); // requires nothing
Init_PreVM(); // requires nothing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100618/12b1b7e9/attachment-0001.html>
More information about the macruby-changes
mailing list