Ruby 4.1.0dev (2026-03-27 revision afe5f77a2610a6dfcb0df196723cd2e7012208d6)
Macros
format.h File Reference

(afe5f77a2610a6dfcb0df196723cd2e7012208d6)

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.