summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-27 10:03:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-27 10:03:12 +0000
commit2b2a9a23d0e8adb2e53e99bc780e6084a404c53b (patch)
tree0ddc423fcc89dd0994e625e7669e8c85f4737020
parent1ac307dddc22f333e5e1d93110eb4eeb947fc79c (diff)
* include/ruby/intern.h (rb_*str_new_cstr, rb_str_buf_new_cstr),
(rb_str_buf_cat2, rb_str_cat2, rb_exc_new2): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--include/ruby/intern.h20
2 files changed, 15 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f3cf7533ef..2e14993c095 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jul 27 19:03:07 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * include/ruby/intern.h (rb_*str_new_cstr, rb_str_buf_new_cstr),
+ (rb_str_buf_cat2, rb_str_cat2, rb_exc_new2): suppress warnings.
+
Mon Jul 27 10:24:50 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/rdoc/parser.rb (RDoc::Parser.binary?): fix for empty files.
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 4418806a6bc..bfbd0ef165f 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -658,56 +658,56 @@ size_t rb_str_capacity(VALUE);
#define rb_str_new_cstr(str) __extension__ ( \
{ \
(__builtin_constant_p(str)) ? \
- rb_str_new(str, strlen(str)) : \
+ rb_str_new(str, (long)strlen(str)) : \
rb_str_new_cstr(str); \
})
#define rb_tainted_str_new_cstr(str) __extension__ ( \
{ \
(__builtin_constant_p(str)) ? \
- rb_tainted_str_new(str, strlen(str)) : \
+ rb_tainted_str_new(str, (long)strlen(str)) : \
rb_tainted_str_new_cstr(str); \
})
#define rb_usascii_str_new_cstr(str) __extension__ ( \
{ \
(__builtin_constant_p(str)) ? \
- rb_usascii_str_new(str, strlen(str)) : \
+ rb_usascii_str_new(str, (long)strlen(str)) : \
rb_usascii_str_new_cstr(str); \
})
#define rb_external_str_new_cstr(str) __extension__ ( \
{ \
(__builtin_constant_p(str)) ? \
- rb_external_str_new(str, strlen(str)) : \
+ rb_external_str_new(str, (long)strlen(str)) : \
rb_external_str_new_cstr(str); \
})
#define rb_locale_str_new_cstr(str) __extension__ ( \
{ \
(__builtin_constant_p(str)) ? \
- rb_locale_str_new(str, strlen(str)) : \
+ rb_locale_str_new(str, (long)strlen(str)) : \
rb_locale_str_new_cstr(str); \
})
#define rb_str_buf_new_cstr(str) __extension__ ( \
{ \
(__builtin_constant_p(str)) ? \
- rb_str_buf_cat(rb_str_buf_new(strlen(str)), \
- str, strlen(str)) : \
+ rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), \
+ str, (long)strlen(str)) : \
rb_str_buf_new_cstr(str); \
})
#define rb_str_buf_cat2(str, ptr) __extension__ ( \
{ \
(__builtin_constant_p(ptr)) ? \
- rb_str_buf_cat(str, ptr, strlen(ptr)) : \
+ rb_str_buf_cat(str, ptr, (long)strlen(ptr)) : \
rb_str_buf_cat2(str, ptr); \
})
#define rb_str_cat2(str, ptr) __extension__ ( \
{ \
(__builtin_constant_p(ptr)) ? \
- rb_str_cat(str, ptr, strlen(ptr)) : \
+ rb_str_cat(str, ptr, (long)strlen(ptr)) : \
rb_str_cat2(str, ptr); \
})
#define rb_exc_new2(klass, ptr) __extension__ ( \
{ \
(__builtin_constant_p(ptr)) ? \
- rb_exc_new(klass, ptr, strlen(ptr)) : \
+ rb_exc_new(klass, ptr, (long)strlen(ptr)) : \
rb_exc_new2(klass, ptr); \
})
#endif