summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-06 14:07:06 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-06 14:07:06 +0000
commit75ce78429ee220349e3e01aa874e918e1eb1745f (patch)
treef5b8167dc5f0ba0721d1131ee587890bf1b2b264 /vm_core.h
parent2bbeb4c0ad49847b1f73ba6281827bf513d05884 (diff)
* vm_core.h: Introduce UNINITIALIZED_VAR() macro.
* thread.c (do_select): Use UNINITIALIZED_VAR() instead FAKE_FD_ZERO(). Also, remove FAKE_FD_ZERO completely. [Feature #3018] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 7bf199b68a..b5c1bf0ad9 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -106,6 +106,12 @@
#define UNLIKELY(x) (x)
#endif /* __GNUC__ >= 3 */
+#if __GNUC__ >= 3
+#define UNINITIALIZED_VAR(x) x = x
+#else
+#define UNINITIALIZED_VAR(x) x
+#endif
+
typedef unsigned long rb_num_t;
/* iseq data type */