summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-28 21:54:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-28 21:54:34 +0000
commitda8406f0ac00ae941cd7b2dee69c42313d4ac0a8 (patch)
tree27e8b47b957abed822099e613c2450976d0c4beb /win32/win32.c
parentfc0511f412fee6ee6388c6b267abd8bf45d8fd58 (diff)
win32.c: use enum
* win32/win32.c (rb_w32_pipe): use enum for compile time constants, instead of const int for debugging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 55a73b4056..0a03d7bcca 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -5655,10 +5655,12 @@ rb_w32_pipe(int fds[2])
{
static DWORD serial = 0;
static const char prefix[] = "\\\\.\\pipe\\ruby";
- const int width_of_prefix = (int)sizeof(prefix) - 1;
- const int width_of_pid = (int)sizeof(rb_pid_t) * 2;
- const int width_of_serial = (int)sizeof(serial) * 2;
- const int width_of_ids = width_of_pid + 1 + width_of_serial + 1;
+ enum {
+ width_of_prefix = (int)sizeof(prefix) - 1,
+ width_of_pid = (int)sizeof(rb_pid_t) * 2,
+ width_of_serial = (int)sizeof(serial) * 2,
+ width_of_ids = width_of_pid + 1 + width_of_serial + 1
+ };
char name[sizeof(prefix) + width_of_ids];
SECURITY_ATTRIBUTES sec;
HANDLE hRead, hWrite, h;