diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-30 21:08:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-30 21:08:36 +0000 |
commit | fc3f1bc228f8fe358e7f77c512374c421cbf8e7a (patch) | |
tree | e55c620c5ee284096537f46f50e2139289cf758c /include/ruby/encoding.h | |
parent | 02642514d58cad8be04f467cba845e3f56f422ad (diff) | |
download | ruby-fc3f1bc228f8fe358e7f77c512374c421cbf8e7a.tar.gz ruby-fc3f1bc228f8fe358e7f77c512374c421cbf8e7a.tar.xz ruby-fc3f1bc228f8fe358e7f77c512374c421cbf8e7a.zip |
* include/ruby/encoding.h (rb_enc_sprintf, rb_enc_vsprintf): prototyped.
* sprintf.c (rb_enc_sprintf, rb_enc_vsprintf): new functions to format
arguments with encoding.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/encoding.h')
-rw-r--r-- | include/ruby/encoding.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index cbe4f8874..89f3ec36b 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -13,6 +13,11 @@ #ifndef RUBY_ENCODING_H #define RUBY_ENCODING_H 1 +#ifdef HAVE_STDARG_PROTOTYPES +# include <stdarg.h> +#else +# include <varargs.h> +#endif #include "ruby/oniguruma.h" #define ENCODING_INLINE_MAX 1023 @@ -54,6 +59,8 @@ void rb_enc_associate(VALUE, rb_encoding*); void rb_enc_copy(VALUE dst, VALUE src); VALUE rb_enc_str_new(const char*, long len, rb_encoding*); +PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3); +VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list); long rb_enc_strlen(const char*, const char*, rb_encoding*); char* rb_enc_nth(const char*, const char*, int, rb_encoding*); VALUE rb_obj_encoding(VALUE); |