ruby-changes:21048
From: naruse <ko1@a...>
Date: Sat, 27 Aug 2011 19:06:34 +0900 (JST)
Subject: [ruby-changes:21048] naruse:r33097 (trunk): * internal.h (rb_strftime_timespec): moved from time.c and define only
naruse 2011-08-27 19:06:25 +0900 (Sat, 27 Aug 2011) New Revision: 33097 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33097 Log: * internal.h (rb_strftime_timespec): moved from time.c and define only if ruby/encoding.h is included. * internal.h (rb_strftime): ditto. Modified files: trunk/ChangeLog trunk/internal.h trunk/time.c Index: time.c =================================================================== --- time.c (revision 33096) +++ time.c (revision 33097) @@ -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_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, Index: ChangeLog =================================================================== --- ChangeLog (revision 33096) +++ ChangeLog (revision 33097) @@ -1,3 +1,10 @@ +Sat Aug 27 19:04:06 2011 NARUSE, Yui <naruse@r...> + + * 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@c...> * proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure. Index: internal.h =================================================================== --- internal.h (revision 33096) +++ internal.h (revision 33097) @@ -157,6 +157,14 @@ /* 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/