[macruby-changes] [3731] MacRuby/trunk/array.c
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 10 12:32:54 PST 2010
Revision: 3731
http://trac.macosforge.org/projects/ruby/changeset/3731
Author: lsansonetti at apple.com
Date: 2010-03-10 12:32:52 -0800 (Wed, 10 Mar 2010)
Log Message:
-----------
removed unnecessary code (xrealloc will default to xmalloc on leopard or below)
Modified Paths:
--------------
MacRuby/trunk/array.c
Modified: MacRuby/trunk/array.c
===================================================================
--- MacRuby/trunk/array.c 2010-03-10 04:39:52 UTC (rev 3730)
+++ MacRuby/trunk/array.c 2010-03-10 20:32:52 UTC (rev 3731)
@@ -45,19 +45,11 @@
if (rary->cap > 0) {
newlen *= 2;
}
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
- VALUE *new_elements = (VALUE *)xmalloc(sizeof(VALUE) * newlen);
- for (size_t i = 0; i < rary->len; i++) {
- GC_WB(&new_elements[i], rary->elements[i]);
- }
- GC_WB(&ary->elements, new_elements);
-#else
VALUE *new_elements = xrealloc(rary->elements,
sizeof(VALUE) * newlen);
if (new_elements != rary->elements) {
GC_WB(&rary->elements, new_elements);
}
-#endif
rary->cap = newlen;
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100310/a2017c88/attachment.html>
More information about the macruby-changes
mailing list