mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Exchange do { } while (0) for ((void)0)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
32f85f3caa
commit
a443067ba2
2 changed files with 6 additions and 4 deletions
|
@ -137,10 +137,10 @@ void xfree _((void*));
|
||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(sparc) || defined(__sparc__)
|
||||||
static inline void
|
static inline void
|
||||||
flush_register_windows(void)
|
flush_register_windows(void)
|
||||||
{
|
{
|
||||||
#if defined(sparc) || defined(__sparc__)
|
|
||||||
# if defined(__sparc_v9__) || defined(__arch64__)
|
# if defined(__sparc_v9__) || defined(__arch64__)
|
||||||
asm volatile ("flushw" : :);
|
asm volatile ("flushw" : :);
|
||||||
# elif defined(linux) || defined(__linux__)
|
# elif defined(linux) || defined(__linux__)
|
||||||
|
@ -148,9 +148,11 @@ flush_register_windows(void)
|
||||||
# else /* Solaris, OpenBSD, NetBSD, etc. */
|
# else /* Solaris, OpenBSD, NetBSD, etc. */
|
||||||
asm volatile ("ta 0x03");
|
asm volatile ("ta 0x03");
|
||||||
# endif /* trap always to flush register windows if we are on a Sparc system */
|
# endif /* trap always to flush register windows if we are on a Sparc system */
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
# define FLUSH_REGISTER_WINDOWS flush_register_windows()
|
# define FLUSH_REGISTER_WINDOWS flush_register_windows()
|
||||||
|
#else
|
||||||
|
# define FLUSH_REGISTER_WINDOWS ((void)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(DOSISH)
|
#if defined(DOSISH)
|
||||||
#define PATH_SEP ";"
|
#define PATH_SEP ";"
|
||||||
|
|
2
eval.c
2
eval.c
|
@ -938,7 +938,7 @@ static void call_trace_func _((char*,NODE*,VALUE,ID,VALUE));
|
||||||
#define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \
|
#define SET_CURRENT_SOURCE() (ruby_sourcefile = ruby_current_node->nd_file, \
|
||||||
ruby_sourceline = nd_line(ruby_current_node))
|
ruby_sourceline = nd_line(ruby_current_node))
|
||||||
#else
|
#else
|
||||||
#define SET_CURRENT_SOURCE() do { } while (0)
|
#define SET_CURRENT_SOURCE() ((void)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue