Ruby 4.1.0dev (2026-10-08 revision 6203c21e58e4c27a91a3336ff2140a9641079025)
Macros
format.h File Reference

(6203c21e58e4c27a91a3336ff2140a9641079025)

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRISM_ATTRIBUTE_FORMAT(fmt_idx_, arg_idx_)   __attribute__((format(printf, fmt_idx_, arg_idx_)))
 Certain compilers support specifying that a function accepts variadic parameters that look like printf format strings to provide a better developer experience when someone is using the function.
 

Macro Definition Documentation

◆ PRISM_ATTRIBUTE_FORMAT

#define PRISM_ATTRIBUTE_FORMAT (   fmt_idx_,
  arg_idx_ 
)    __attribute__((format(printf, fmt_idx_, arg_idx_)))

Certain compilers support specifying that a function accepts variadic parameters that look like printf format strings to provide a better developer experience when someone is using the function.

This macro does that in a compiler-agnostic way.

Definition at line 17 of file format.h.