summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-30 21:08:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-30 21:08:36 +0000
commit3d0260cc9445139eb51e4ff66858ebea336a108b (patch)
treee55c620c5ee284096537f46f50e2139289cf758c /include
parentf7b12afff5f7779ab0f6542abe41a356a32cc142 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/encoding.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index cbe4f88743..89f3ec36b8 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);