mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
fc0511f412
commit
da8406f0ac
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Jul 29 06:54:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (rb_w32_pipe): use enum for compile time constants,
|
||||
instead of const int for debugging.
|
||||
|
||||
Mon Jul 29 00:11:49 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (bigdivrem): Specialized implementation added for
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue