[前][次][番号順一覧][スレッド一覧]

ruby-changes:33809

From: nobu <ko1@a...>
Date: Fri, 9 May 2014 23:31:44 +0900 (JST)
Subject: [ruby-changes:33809] nobu:r45890 (trunk): thread_*.c: constify

nobu	2014-05-09 23:31:34 +0900 (Fri, 09 May 2014)

  New Revision: 45890

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45890

  Log:
    thread_*.c: constify
    
    * thread_{pthread,win32}.c (native_cond_timedwait): constify.

  Modified files:
    trunk/thread_pthread.c
    trunk/thread_win32.c
Index: thread_win32.c
===================================================================
--- thread_win32.c	(revision 45889)
+++ thread_win32.c	(revision 45890)
@@ -479,7 +479,7 @@ native_cond_wait(rb_nativethread_cond_t https://github.com/ruby/ruby/blob/trunk/thread_win32.c#L479
 }
 
 static unsigned long
-abs_timespec_to_timeout_ms(struct timespec *ts)
+abs_timespec_to_timeout_ms(const struct timespec *ts)
 {
     struct timeval tv;
     struct timeval now;
@@ -495,7 +495,7 @@ abs_timespec_to_timeout_ms(struct timesp https://github.com/ruby/ruby/blob/trunk/thread_win32.c#L495
 }
 
 static int
-native_cond_timedwait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex, struct timespec *ts)
+native_cond_timedwait(rb_nativethread_cond_t *cond, rb_nativethread_lock_t *mutex, const struct timespec *ts)
 {
     unsigned long timeout_ms;
 
Index: thread_pthread.c
===================================================================
--- thread_pthread.c	(revision 45889)
+++ thread_pthread.c	(revision 45890)
@@ -338,7 +338,7 @@ native_cond_wait(rb_nativethread_cond_t https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L338
 }
 
 static int
-native_cond_timedwait(rb_nativethread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *ts)
+native_cond_timedwait(rb_nativethread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *ts)
 {
     int r;
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]