1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* internal.h (rb_strftime_timespec): moved from time.c and define only

if ruby/encoding.h is included.

* internal.h (rb_strftime): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-08-27 10:06:25 +00:00
parent a09e7139a3
commit 6bc83a18b7
3 changed files with 15 additions and 7 deletions

View file

@ -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.

View file

@ -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);

7
time.c
View file

@ -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,