diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-10 03:43:33 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-10 03:43:33 +0000 |
| commit | 98908cc858689150d2072dfcc5e2754fc491e9b7 (patch) | |
| tree | 58af2b3f201b677bf7ed2982c4717d5910f55f18 /include/ruby/ruby.h | |
| parent | c006807482d04638c177ced988f4422b7566cc7c (diff) | |
| download | ruby-98908cc858689150d2072dfcc5e2754fc491e9b7.tar.gz ruby-98908cc858689150d2072dfcc5e2754fc491e9b7.tar.xz ruby-98908cc858689150d2072dfcc5e2754fc491e9b7.zip | |
* include/ruby/ruby.h (CONST_ID_CACHE): fixed statement expression.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
| -rw-r--r-- | include/ruby/ruby.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index d51718023..799fc1e71 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -765,20 +765,20 @@ ID rb_to_id(VALUE); VALUE rb_id2str(ID); #define CONST_ID_CACHE(result, str) \ - ({ \ + { \ static ID rb_intern_id_cache; \ if (!rb_intern_id_cache) \ rb_intern_id_cache = (rb_intern)(str); \ result rb_intern_id_cache; \ - }) + } #define CONST_ID(var, str) \ - do {CONST_ID_CACHE(var =, str);} while (0) + do CONST_ID_CACHE(var =, str) while (0) #ifdef __GNUC__ /* __builtin_constant_p and statement expression is available * since gcc-2.7.2.3 at least. */ #define rb_intern(str) \ (__builtin_constant_p(str) ? \ - CONST_ID_CACHE(/**/, str) : \ + (CONST_ID_CACHE(/**/, str)) : \ rb_intern(str)) #endif |
