summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-12 21:57:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-12 21:57:11 +0000
commited1605fbf381fbaad54602f948cdf0d12614561a (patch)
treea81a8d78262d00b2c439c7e49ac765b71cfa76aa
parentbee3668868ff1bafa0a17c314c2b196e94ea2620 (diff)
* ext/pty/pty.c (raise_from_wait, pty_syswait, get_device_once):
constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@18053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/pty/pty.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 30030fd001..0fe750c882 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jul 13 06:57:09 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/pty/pty.c (raise_from_wait, pty_syswait, get_device_once):
+ constified.
+
Sat Jul 12 16:02:31 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/xmlrpc/client.rb (XMLRPC::Client#do_rpc): requires
diff --git a/ext/pty/pty.c b/ext/pty/pty.c
index 939335242f..8d2b483595 100644
--- a/ext/pty/pty.c
+++ b/ext/pty/pty.c
@@ -130,8 +130,8 @@ struct pty_info {
static void
raise_from_wait(state, info)
- struct pty_info *info;
- char *state;
+ const char *state;
+ const struct pty_info *info;
{
extern VALUE rb_last_status;
char buf[1024];
@@ -144,9 +144,9 @@ raise_from_wait(state, info)
}
static VALUE
-pty_syswait(info)
- struct pty_info *info;
+pty_syswait(void *arg)
{
+ const struct pty_info *info = arg;
int cpid, status;
for (;;) {
@@ -204,7 +204,7 @@ establishShell(argc, argv, info, SlaveName)
int status;
if (argc == 0) {
- char *shellname;
+ const char *shellname;
if ((p = getenv("SHELL")) != NULL) {
shellname = p;
@@ -372,7 +372,7 @@ get_device_once(master, slave, SlaveName, 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++) {