aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-23 11:57:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-23 11:57:01 +0000
commit8bc77e72eb806fca3be0f2293dc081e76803de4b (patch)
tree44c7235c2395f933342c2c6b269bc160c5ad5b55 /internal.h
parentba154c2b46641edf479b4ac1a1bd99a79eafbbf0 (diff)
downloadruby-8bc77e72eb806fca3be0f2293dc081e76803de4b.tar.gz
strftime.c: format in String
* strftime.c (rb_strftime_with_timespec): append formatted results to the given string with expanding, and also deal with NUL chars. * strftime.c (rb_strftime, rb_strftime_timespec): return formatted string, not the length put in the given buffer. * time.c (rb_strftime_alloc): no longer needs to retry with reallocating buffers. * time.c (time_strftime): no longer needs to split by NUL chars. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal.h b/internal.h
index 38175d776e..e5a098db5f 100644
--- a/internal.h
+++ b/internal.h
@@ -1214,10 +1214,10 @@ int rb_sigaltstack_size(void);
/* strftime.c */
#ifdef RUBY_ENCODING_H
-size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, rb_encoding *enc,
- const struct vtm *vtm, struct timespec *ts, int gmt);
-size_t rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc,
- const struct vtm *vtm, VALUE timev, int gmt);
+VALUE rb_strftime_timespec(const char *format, size_t format_len, rb_encoding *enc,
+ const struct vtm *vtm, struct timespec *ts, int gmt);
+VALUE rb_strftime(const char *format, size_t format_len, rb_encoding *enc,
+ const struct vtm *vtm, VALUE timev, int gmt);
#endif
/* string.c */