From 277cedb84c918abd6b67e5ab59251ec52d5def8c Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 8 Aug 2018 10:00:43 +0000 Subject: Store String as zone in struct vtm. This removes zone_table and use fstring instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- strftime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'strftime.c') diff --git a/strftime.c b/strftime.c index ebb587c379..ec656f6130 100644 --- a/strftime.c +++ b/strftime.c @@ -619,11 +619,11 @@ rb_strftime_with_timespec(VALUE ftime, const char *format, size_t format_len, tp = "UTC"; break; } - if (vtm->zone == NULL) { + if (NIL_P(vtm->zone)) { i = 0; } else { - tp = vtm->zone; + tp = RSTRING_PTR(vtm->zone); if (enc) { for (i = 0; i < TBUFSIZE && tp[i]; i++) { if ((unsigned char)tp[i] > 0x7F) { -- cgit v1.2.1