| 107 | #undef XX |
| 108 | |
| 109 | void FormatPointerValue( |
| 110 | TStringBuilderBase* builder, |
| 111 | const void* value, |
| 112 | TStringBuf format) |
| 113 | { |
| 114 | static_assert(sizeof(value) == sizeof(ui64)); |
| 115 | if (format == TStringBuf("p") || format == TStringBuf("v")) { |
| 116 | builder->AppendString(TStringBuf("0x")); |
| 117 | FormatValue(builder, reinterpret_cast<ui64>(value), TStringBuf("x")); |
| 118 | } else if (format == TStringBuf("x") || format == TStringBuf("X")) { |
| 119 | FormatValue(builder, reinterpret_cast<ui64>(value), format); |
| 120 | } else { |
| 121 | builder->AppendString("<invalid pointer format>"); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | //////////////////////////////////////////////////////////////////////////////// |
| 126 |
no test coverage detected