diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | internal.h | 8 | ||||
-rw-r--r-- | time.c | 7 |
3 files changed, 15 insertions, 7 deletions
@@ -1,3 +1,10 @@ +Sat Aug 27 19:04:06 2011 NARUSE, Yui <naruse@ruby-lang.org> + + * internal.h (rb_strftime_timespec): moved from time.c and define only + if ruby/encoding.h is included. + + * internal.h (rb_strftime): ditto. + Sat Aug 27 18:53:51 2011 Kazuki Tsujimoto <kazuki@callcc.net> * proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure. diff --git a/internal.h b/internal.h index 3bd4d6a639..576ec32699 100644 --- a/internal.h +++ b/internal.h @@ -157,6 +157,14 @@ VALUE rb_reg_check_preprocess(VALUE); /* signal.c */ int rb_get_next_signal(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); +#endif + /* string.c */ int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p); @@ -16,9 +16,6 @@ #include "ruby/encoding.h" #include "internal.h" -/* strftime.c */ -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); - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif @@ -4286,10 +4283,6 @@ time_to_a(VALUE time) time_zone(time)); } -size_t -rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc, - const struct vtm *vtm, VALUE timev, int gmt); - #define SMALLBUF 100 static size_t rb_strftime_alloc(char **buf, const char *format, rb_encoding *enc, |