[macruby-changes] [3636] MacRuby/branches/icu/parse.y
source_changes at macosforge.org
source_changes at macosforge.org
Fri Feb 26 16:16:05 PST 2010
Revision: 3636
http://trac.macosforge.org/projects/ruby/changeset/3636
Author: lsansonetti at apple.com
Date: 2010-02-26 16:16:02 -0800 (Fri, 26 Feb 2010)
Log Message:
-----------
use orig_free and not free since it's a macro to xfree
Modified Paths:
--------------
MacRuby/branches/icu/parse.y
Modified: MacRuby/branches/icu/parse.y
===================================================================
--- MacRuby/branches/icu/parse.y 2010-02-26 23:44:04 UTC (rev 3635)
+++ MacRuby/branches/icu/parse.y 2010-02-27 00:16:02 UTC (rev 3636)
@@ -34,6 +34,7 @@
#define YYCALLOC(nelem, size) rb_parser_calloc(parser, nelem, size)
#define YYFREE(ptr) rb_parser_free(parser, ptr)
static inline void *orig_malloc(size_t l) { return malloc(l); }
+static inline void orig_free(void *ptr) { free(ptr); }
#define malloc YYMALLOC
#define realloc YYREALLOC
#define calloc YYCALLOC
@@ -5100,7 +5101,8 @@
NODE *node = yycompile(parser, f, line);
if (need_free && chars != NULL) {
- free(chars);
+ orig_free(chars);
+ chars = NULL;
}
return node;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100226/e5fc1104/attachment-0001.html>
More information about the macruby-changes
mailing list