mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
string literal longer than 509 characters is a C99ism
Should avoid such thing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
76091d4388
commit
f6f1cfcbe7
1 changed files with 6 additions and 0 deletions
|
@ -33,8 +33,14 @@ NORETURN(void rb_assert_failure(const char *, int, const char *, const char *));
|
|||
#define RUBY_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(!RUBY_NDEBUG+0, expr, #expr)
|
||||
#define RUBY_ASSERT_WHEN(cond, expr) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr)
|
||||
|
||||
#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
|
||||
/* C89 compilers are required to support strings of only 509 chars. */
|
||||
/* can't use RUBY_ASSERT for such compilers. */
|
||||
#include <assert.h>
|
||||
#else
|
||||
#undef assert
|
||||
#define assert RUBY_ASSERT
|
||||
#endif
|
||||
|
||||
#ifndef RUBY_NDEBUG
|
||||
# ifdef NDEBUG
|
||||
|
|
Loading…
Reference in a new issue