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

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

sprintf.h
Go to the documentation of this file.
1#ifndef RUBY_INTERNAL_ENCODING_SPRINTF_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RUBY_INTERNAL_ENCODING_SPRINTF_H
23#include "ruby/internal/config.h"
24#include <stdarg.h>
25#include "ruby/internal/attr/format.h"
26#include "ruby/internal/attr/nonnull.h"
27#include "ruby/internal/attr/noreturn.h"
28#include "ruby/internal/dllexport.h"
29#include "ruby/internal/encoding/encoding.h"
30#include "ruby/internal/value.h"
31
32 RBIMPL_SYMBOL_EXPORT_BEGIN()
33 RBIMPL_ATTR_NONNULL((2))
34 RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
45 VALUE rb_enc_sprintf(rb_encoding *enc, const char *fmt, ...);
46
47 RBIMPL_ATTR_NONNULL((2))
48 RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 0)
59 VALUE rb_enc_vsprintf(rb_encoding *enc, const char *fmt, va_list ap);
60
61 RBIMPL_ATTR_NORETURN()
62 RBIMPL_ATTR_NONNULL((3))
63 RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 3, 4)
74void rb_enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...);
75
76 RBIMPL_SYMBOL_EXPORT_END()
77
78#endif /* RUBY_INTERNAL_ENCODING_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
rb_enc_vsprintf
VALUE rb_enc_vsprintf(rb_encoding *enc, const char *fmt, va_list ap)
Identical to rb_enc_sprintf(), except it takes a va_list instead of variadic arguments.
Definition sprintf.c:1181
rb_enc_sprintf
VALUE rb_enc_sprintf(rb_encoding *enc, const char *fmt,...)
Identical to rb_sprintf(), except it additionally takes an encoding.
Definition sprintf.c:1200
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_enc_raise
void rb_enc_raise(rb_encoding *enc, VALUE exc, const char *fmt,...)
Identical to rb_raise(), except it additionally takes an encoding.
Definition error.c:3131
encoding.h
Defines rb_encoding.
nonnull.h
Defines RBIMPL_ATTR_NONNULL.
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
noreturn.h
Defines RBIMPL_ATTR_NORETURN.
RBIMPL_ATTR_NORETURN
#define RBIMPL_ATTR_NORETURN()
Wraps (or simulates) [[noreturn]]
Definition noreturn.h:38
stdarg.h
Defines old _.
OnigEncodingTypeST
Definition onigmo.h:160
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40