Ruby: include/ruby/internal/intern/sprintf.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

sprintf.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_SPRINTF_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_SPRINTF_H
23#include "ruby/internal/attr/format.h"
24#include "ruby/internal/attr/nonnull.h"
25#include "ruby/internal/dllexport.h"
26#include "ruby/internal/value.h"
27
28 RBIMPL_SYMBOL_EXPORT_BEGIN()
29
30/* sprintf.c */
31
32
43 VALUE rb_f_sprintf(int argc, const VALUE *argv);
44
45 RBIMPL_ATTR_NONNULL((1))
46 RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 2)
82 VALUE rb_sprintf(const char *fmt, ...);
83
84 RBIMPL_ATTR_NONNULL((1))
85 RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 1, 0)
93 VALUE rb_vsprintf(const char *fmt, va_list ap);
94
95 RBIMPL_ATTR_NONNULL((2))
96 RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
108 VALUE rb_str_catf(VALUE dst, const char *fmt, ...);
109
110 RBIMPL_ATTR_NONNULL((2))
111 RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0)
124 VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap);
125
155 VALUE rb_str_format(int argc, const VALUE *argv, VALUE fmt);
156
157 RBIMPL_SYMBOL_EXPORT_END()
158
159#endif /* RBIMPL_INTERN_SPRINTF_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:106
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:97
format.h
Defines RBIMPL_ATTR_FORMAT.
RBIMPL_ATTR_FORMAT
#define RBIMPL_ATTR_FORMAT(x, y, z)
Wraps (or simulates) __attribute__((format))
Definition format.h:29
rb_str_format
VALUE rb_str_format(int argc, const VALUE *argv, VALUE fmt)
Formats a string.
Definition sprintf.c:214
rb_f_sprintf
VALUE rb_f_sprintf(int argc, const VALUE *argv)
Identical to rb_str_format(), except how the arguments are arranged.
Definition sprintf.c:208
rb_sprintf
VALUE rb_sprintf(const char *fmt,...)
Ruby's extended sprintf(3).
Definition sprintf.c:1219
rb_str_vcatf
VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap)
Identical to rb_str_catf(), except it takes a va_list.
Definition sprintf.c:1232
rb_vsprintf
VALUE rb_vsprintf(const char *fmt, va_list ap)
Identical to rb_sprintf(), except it takes a va_list.
Definition sprintf.c:1213
rb_str_catf
VALUE rb_str_catf(VALUE dst, const char *fmt,...)
Identical to rb_sprintf(), except it renders the output to the specified object rather than creating ...
Definition sprintf.c:1242
nonnull.h
Defines RBIMPL_ATTR_NONNULL.
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40