diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-23 01:02:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-23 01:02:18 +0000 |
commit | 6524f34a2688436249d111a3456a097c7111722c (patch) | |
tree | f9c83bf95a7873e01e38ff396a8bc5490b61162c /intern.h | |
parent | e6a02b93747266925fd536a30715352bf2c60c07 (diff) |
* sprintf.c (rb_vsprintf, rb_sprintf): new functions return new String,
using missing/vsnprintf.c. [ruby-dev:26580]
* missing/vsnprintf.c: made the output changeable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'intern.h')
-rw-r--r-- | intern.h | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -15,6 +15,12 @@ #ifndef RUBY_INTERN_H #define RUBY_INTERN_H 1 +#ifdef HAVE_STDARG_PROTOTYPES +# include <stdarg.h> +#else +# include <varargs.h> +#endif + /* * Functions and variables that are used by more than one source file of * the kernel. @@ -449,7 +455,14 @@ void rb_trap_exit _((void)); void rb_trap_exec _((void)); const char *ruby_signal_name _((int)); /* sprintf.c */ -VALUE rb_f_sprintf _((int, VALUE*)); +VALUE rb_f_sprintf _((int, const VALUE*)); +VALUE rb_sprintf __((const char*, ...)) +#ifdef __GNUC__ + __attribute__((format(printf,1,2))) +#endif + ; +VALUE rb_vsprintf _((const char*, va_list)); +VALUE rb_str_format _((int, const VALUE *, VALUE)); /* string.c */ VALUE rb_str_new _((const char*, long)); VALUE rb_str_new2 _((const char*)); |