[macruby-changes] [676] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Sat Oct 25 19:29:26 PDT 2008
Revision: 676
http://trac.macosforge.org/projects/ruby/changeset/676
Author: lsansonetti at apple.com
Date: 2008-10-25 19:29:26 -0700 (Sat, 25 Oct 2008)
Log Message:
-----------
MallocDebug is my hero
Modified Paths:
--------------
MacRuby/trunk/include/ruby/util.h
MacRuby/trunk/io.c
MacRuby/trunk/parse.y
MacRuby/trunk/util.c
Modified: MacRuby/trunk/include/ruby/util.h
===================================================================
--- MacRuby/trunk/include/ruby/util.h 2008-10-26 02:00:15 UTC (rev 675)
+++ MacRuby/trunk/include/ruby/util.h 2008-10-26 02:29:26 UTC (rev 676)
@@ -60,8 +60,10 @@
#define unsetenv(name,val) ruby_unsetenv(name);
char *ruby_strdup(const char *);
+#if !WITH_OBJC
#undef strdup
#define strdup(s) ruby_strdup(s)
+#endif
char *ruby_getcwd(void);
#define my_getcwd() ruby_getcwd()
Modified: MacRuby/trunk/io.c
===================================================================
--- MacRuby/trunk/io.c 2008-10-26 02:00:15 UTC (rev 675)
+++ MacRuby/trunk/io.c 2008-10-26 02:29:26 UTC (rev 676)
@@ -2783,7 +2783,7 @@
if (!fptr) return 0;
if (fptr->refcnt <= 0 || --fptr->refcnt) return 0;
if (fptr->path) {
- xfree(fptr->path);
+ free(fptr->path);
fptr->path = 0;
}
if (0 <= fptr->fd)
@@ -4425,7 +4425,7 @@
fptr->mode = orig->mode | (fptr->mode & FMODE_PREP);
fptr->pid = orig->pid;
fptr->lineno = orig->lineno;
- if (fptr->path) xfree(fptr->path);
+ if (fptr->path) free(fptr->path);
if (orig->path) fptr->path = strdup(orig->path);
else fptr->path = 0;
fptr->finalize = orig->finalize;
Modified: MacRuby/trunk/parse.y
===================================================================
--- MacRuby/trunk/parse.y 2008-10-26 02:00:15 UTC (rev 675)
+++ MacRuby/trunk/parse.y 2008-10-26 02:29:26 UTC (rev 676)
@@ -4881,7 +4881,7 @@
static NODE*
yycompile(struct parser_params *parser, const char *f, int line)
{
- ruby_sourcefile = ruby_strdup(f);
+ GC_WB(&ruby_sourcefile, ruby_strdup(f));
ruby_sourceline = line - 1;
return (NODE *)ruby_suppress_tracing(yycompile0, (VALUE)parser, Qtrue);
}
Modified: MacRuby/trunk/util.c
===================================================================
--- MacRuby/trunk/util.c 2008-10-26 02:00:15 UTC (rev 675)
+++ MacRuby/trunk/util.c 2008-10-26 02:29:26 UTC (rev 676)
@@ -431,7 +431,7 @@
p = ALLOC(struct PathList);
MEMZERO(p, struct PathList, 1);
- p->path = ruby_strdup(path);
+ GC_WB(&p->path, ruby_strdup(path));
p->next = info->head;
info->head = p;
info->count++;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081025/b4003878/attachment.html>
More information about the macruby-changes
mailing list