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

ruby-changes:51785

From: nobu <ko1@a...>
Date: Thu, 19 Jul 2018 20:22:10 +0900 (JST)
Subject: [ruby-changes:51785] nobu:r63997 (trunk): renamed ruby_tz_update as ruby_tz_uptodate_p

nobu	2018-07-19 20:22:03 +0900 (Thu, 19 Jul 2018)

  New Revision: 63997

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63997

  Log:
    renamed ruby_tz_update as ruby_tz_uptodate_p

  Modified files:
    trunk/hash.c
    trunk/time.c
Index: hash.c
===================================================================
--- hash.c	(revision 63996)
+++ hash.c	(revision 63997)
@@ -3316,7 +3316,7 @@ env_str_new2(const char *ptr) https://github.com/ruby/ruby/blob/trunk/hash.c#L3316
 static int env_path_tainted(const char *);
 
 static const char TZ_ENV[] = "TZ";
-extern int ruby_tz_update;
+extern bool ruby_tz_uptodate_p;
 
 static rb_encoding *
 env_encoding_for(const char *name, const char *ptr)
@@ -3400,7 +3400,7 @@ env_delete(VALUE obj, VALUE name) https://github.com/ruby/ruby/blob/trunk/hash.c#L3400
 	    path_tainted = 0;
 	}
 	else if (ENVMATCH(nam, TZ_ENV)) {
-	    ruby_tz_update = 0;
+	    ruby_tz_uptodate_p = FALSE;
 	}
 	return value;
     }
@@ -3762,7 +3762,7 @@ env_aset(VALUE obj, VALUE nm, VALUE val) https://github.com/ruby/ruby/blob/trunk/hash.c#L3762
 	}
     }
     else if (ENVMATCH(name, TZ_ENV)) {
-	ruby_tz_update = 0;
+	ruby_tz_uptodate_p = FALSE;
     }
     return val;
 }
Index: time.c
===================================================================
--- time.c	(revision 63996)
+++ time.c	(revision 63997)
@@ -647,7 +647,7 @@ static struct vtm *localtimew(wideval_t https://github.com/ruby/ruby/blob/trunk/time.c#L647
 static int leap_year_p(long y);
 #define leap_year_v_p(y) leap_year_p(NUM2LONG(modv((y), INT2FIX(400))))
 
-int ruby_tz_update;
+bool ruby_tz_uptodate_p;
 
 static struct tm *
 rb_localtime_r(const time_t *t, struct tm *result)
@@ -655,8 +655,8 @@ rb_localtime_r(const time_t *t, struct t https://github.com/ruby/ruby/blob/trunk/time.c#L655
 #if defined __APPLE__ && defined __LP64__
     if (*t != (time_t)(int)*t) return NULL;
 #endif
-    if (!ruby_tz_update) {
-	ruby_tz_update = 1;
+    if (!ruby_tz_uptodate_p) {
+	ruby_tz_uptodate_p = 1;
 	tzset();
     }
 #ifdef HAVE_GMTIME_R

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

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