зеркало из https://github.com/github/ruby.git
intern.h: rb_str_new_literal
* include/ruby/intern.h (rb_str_new_literal): define on all platforms, not only gcc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
7a6934f3a8
Коммит
e396ba84fb
|
@ -1,3 +1,8 @@
|
|||
Sat Jan 3 19:52:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/intern.h (rb_str_new_literal): define on all
|
||||
platforms, not only gcc.
|
||||
|
||||
Sat Jan 3 18:53:28 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/fiddle/lib/fiddle/cparser.rb (parse_ctype): limit split word
|
||||
|
|
|
@ -832,10 +832,6 @@ VALUE rb_str_scrub(VALUE, VALUE);
|
|||
rb_utf8_str_new_static((str), (long)strlen(str)) : \
|
||||
rb_utf8_str_new_cstr(str); \
|
||||
})
|
||||
#define rb_str_new_literal(str) rb_str_new_static((str), sizeof(str)-1)
|
||||
#define rb_usascii_str_new_literal(str) rb_usascii_str_new_static((str), sizeof(str)-1)
|
||||
#define rb_utf8_str_new_literal(str) rb_utf8_str_new_static((str), sizeof(str)-1)
|
||||
#define rb_enc_str_new_literal(str, enc) rb_enc_str_new_static((str), sizeof(str)-1, (enc))
|
||||
#define rb_external_str_new_cstr(str) __extension__ ( \
|
||||
{ \
|
||||
(__builtin_constant_p(str)) ? \
|
||||
|
@ -878,6 +874,11 @@ VALUE rb_str_scrub(VALUE, VALUE);
|
|||
#define rb_str_buf_cat rb_str_cat
|
||||
#define rb_str_buf_cat2 rb_str_cat_cstr
|
||||
#define rb_str_cat2 rb_str_cat_cstr
|
||||
#define rb_str_new_literal(str) rb_str_new_static((str), sizeof(str)-1)
|
||||
#define rb_usascii_str_new_literal(str) rb_usascii_str_new_static((str), sizeof(str)-1)
|
||||
#define rb_utf8_str_new_literal(str) rb_utf8_str_new_static((str), sizeof(str)-1)
|
||||
#define rb_enc_str_new_literal(str, enc) rb_enc_str_new_static((str), sizeof(str)-1, (enc))
|
||||
|
||||
/* struct.c */
|
||||
VALUE rb_struct_new(VALUE, ...);
|
||||
VALUE rb_struct_define(const char*, ...);
|
||||
|
|
Загрузка…
Ссылка в новой задаче