mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
1ac307dddc
commit
2b2a9a23d0
2 changed files with 15 additions and 10 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue