[macruby-changes] [654] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 7 17:18:37 PDT 2008
Revision: 654
http://trac.macosforge.org/projects/ruby/changeset/654
Author: lsansonetti at apple.com
Date: 2008-10-07 17:18:37 -0700 (Tue, 07 Oct 2008)
Log Message:
-----------
fixing gcc 4.2.1 warnings
Modified Paths:
--------------
MacRuby/trunk/error.c
MacRuby/trunk/eval.c
MacRuby/trunk/gc.c
MacRuby/trunk/include/ruby/defines.h
MacRuby/trunk/objc.m
MacRuby/trunk/thread.c
Modified: MacRuby/trunk/error.c
===================================================================
--- MacRuby/trunk/error.c 2008-10-07 23:25:56 UTC (rev 653)
+++ MacRuby/trunk/error.c 2008-10-08 00:18:37 UTC (rev 654)
@@ -506,21 +506,23 @@
rb_check_backtrace(VALUE bt)
{
long i;
- static const char *err = "backtrace must be Array of String";
+#define BACKTRACE_ERROR "backtrace must be Array of String"
if (!NIL_P(bt)) {
int t = TYPE(bt);
if (t == T_STRING) return rb_ary_new3(1, bt);
if (t != T_ARRAY) {
- rb_raise(rb_eTypeError, err);
+ rb_raise(rb_eTypeError, BACKTRACE_ERROR);
}
for (i=0;i<RARRAY_LEN(bt);i++) {
if (TYPE(RARRAY_AT(bt, i)) != T_STRING) {
- rb_raise(rb_eTypeError, err);
+ rb_raise(rb_eTypeError, BACKTRACE_ERROR);
}
}
}
+#undef BACKTRACE_ERROR
+
return bt;
}
Modified: MacRuby/trunk/eval.c
===================================================================
--- MacRuby/trunk/eval.c 2008-10-07 23:25:56 UTC (rev 653)
+++ MacRuby/trunk/eval.c 2008-10-08 00:18:37 UTC (rev 654)
@@ -475,7 +475,7 @@
rb_interrupt(void)
{
static const char fmt[1] = {'\0'};
- rb_raise(rb_eInterrupt, fmt);
+ rb_raise(rb_eInterrupt, "%s", fmt);
}
static VALUE get_errinfo(void);
Modified: MacRuby/trunk/gc.c
===================================================================
--- MacRuby/trunk/gc.c 2008-10-07 23:25:56 UTC (rev 653)
+++ MacRuby/trunk/gc.c 2008-10-08 00:18:37 UTC (rev 654)
@@ -59,15 +59,13 @@
extern void auto_collector_reenable(auto_zone_t *);
extern boolean_t auto_zone_set_write_barrier(auto_zone_t *, const void *,
const void *);
-extern void auto_zone_write_barrier_range(auto_zone_t *, void *, size_t);
extern void auto_zone_add_root(auto_zone_t *, void *, void *);
extern void auto_zone_register_thread(auto_zone_t *);
extern void auto_zone_unregister_thread(auto_zone_t *);
extern void auto_collect(auto_zone_t *, int, void *);
extern boolean_t auto_zone_is_valid_pointer(auto_zone_t *, const void *);
typedef int auto_memory_type_t;
-extern auto_memory_type_t auto_zone_get_layout_type_no_lock(auto_zone_t *,
- void *);
+extern auto_memory_type_t auto_zone_get_layout_type(auto_zone_t *, void *);
extern void *auto_zone_allocate_object(
auto_zone_t *, size_t, auto_memory_type_t, boolean_t, boolean_t);
extern void *auto_zone_write_barrier_memmove(
@@ -341,12 +339,6 @@
*(void **)dst = newval;
}
-void
-rb_objc_wb_range(void *dst, size_t len)
-{
- auto_zone_write_barrier_range(__auto_zone, dst, len);
-}
-
void *
rb_gc_memmove(void *dst, const void *src, size_t len)
{
@@ -729,7 +721,7 @@
for (r = ranges, end = ranges + range_count; r < end; r++) {
Class c;
auto_memory_type_t type =
- auto_zone_get_layout_type_no_lock(__auto_zone, (void *)r->address);
+ auto_zone_get_layout_type(__auto_zone, (void *)r->address);
if (type != AUTO_OBJECT_SCANNED && type != AUTO_OBJECT_UNSCANNED)
continue;
if (*(Class *)r->address == NULL)
@@ -1023,7 +1015,7 @@
if (auto_zone_is_valid_pointer(auto_zone(), p0)) {
auto_memory_type_t type =
- auto_zone_get_layout_type_no_lock(__auto_zone, p0);
+ auto_zone_get_layout_type(__auto_zone, p0);
if ((type == AUTO_OBJECT_SCANNED || type == AUTO_OBJECT_UNSCANNED)
&& !rb_objc_is_placeholder(p0)
&& (NATIVE((VALUE)p0)
Modified: MacRuby/trunk/include/ruby/defines.h
===================================================================
--- MacRuby/trunk/include/ruby/defines.h 2008-10-07 23:25:56 UTC (rev 653)
+++ MacRuby/trunk/include/ruby/defines.h 2008-10-08 00:18:37 UTC (rev 654)
@@ -294,7 +294,6 @@
# include <CoreFoundation/CoreFoundation.h>
# define ASSERT_NO_OBJC() (assert(1 == 0))
void rb_objc_wb(void *dst, void *newval);
-void rb_objc_wb_range(void *dest, size_t len);
void rb_objc_root(void *addr);
# define GC_WB(dst, newval) (SPECIAL_CONST_P(newval) ? *(void **)dst = (void *)newval : rb_objc_wb((void *)dst, (void *)newval))
# define GC_ROOT(dst) (rb_objc_root((void *)dst))
Modified: MacRuby/trunk/objc.m
===================================================================
--- MacRuby/trunk/objc.m 2008-10-07 23:25:56 UTC (rev 653)
+++ MacRuby/trunk/objc.m 2008-10-08 00:18:37 UTC (rev 654)
@@ -2605,7 +2605,7 @@
bs_parse_cb, rb_cObject_dict, &error);
enable_method_added = Qtrue;
if (!ok) {
- rb_raise(rb_eRuntimeError, error);
+ rb_raise(rb_eRuntimeError, "%s", error);
}
}
Modified: MacRuby/trunk/thread.c
===================================================================
--- MacRuby/trunk/thread.c 2008-10-07 23:25:56 UTC (rev 653)
+++ MacRuby/trunk/thread.c 2008-10-08 00:18:37 UTC (rev 654)
@@ -2563,7 +2563,7 @@
native_mutex_unlock(&mutex->lock);
- if (err) rb_raise(rb_eThreadError, err);
+ if (err) rb_raise(rb_eThreadError, "%s", err);
return self;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20081007/7b13a062/attachment.html
More information about the macruby-changes
mailing list