Ruby 4.1.0dev (2026-11-17 revision 3a19e2efcf133ee35daaeffc36633cd99a9f2c47)
format.h File Reference

(3a19e2efcf133ee35daaeffc36633cd99a9f2c47)

#include <stdio.h>
Include dependency graph for format.h:
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_)
 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_ )
Value:
__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 19 of file format.h.