From ad7bbf83f39abae9084d42604cd0a06ff2879637 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 12 Jul 2008 21:57:11 +0000 Subject: * ext/pty/pty.c (raise_from_wait, pty_syswait, get_device_once): constified. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ ext/pty/pty.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 95aa50b2b..ad442d34a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Jul 13 06:57:09 2008 Nobuyoshi Nakada + + * ext/pty/pty.c (raise_from_wait, pty_syswait, get_device_once): + constified. + Sun Jul 13 05:37:50 2008 NAKAMURA Usaku * include/ruby/ruby.h (PRI_PTRDIFF_PREFIX, PRI_SIZE_PREFIX): typo. diff --git a/ext/pty/pty.c b/ext/pty/pty.c index 027ca7d5a..a2cf17567 100644 --- a/ext/pty/pty.c +++ b/ext/pty/pty.c @@ -131,7 +131,7 @@ struct pty_info { }; static void -raise_from_wait(char *state, struct pty_info *info) +raise_from_wait(const char *state, const struct pty_info *info) { char buf[1024]; VALUE exc; @@ -143,8 +143,9 @@ raise_from_wait(char *state, struct pty_info *info) } static VALUE -pty_syswait(struct pty_info *info) +pty_syswait(void *arg) { + const struct pty_info *const info = arg; rb_pid_t cpid; int status; @@ -363,7 +364,7 @@ get_device_once(int *master, int *slave, char SlaveName[DEVICELEN], int fail) if (!fail) rb_raise(rb_eRuntimeError, "can't get Master/Slave device"); return -1; #else - char **p; + const char *const *p; char MasterName[DEVICELEN]; for (p = deviceNo; *p != NULL; p++) { -- cgit