| 306 | } |
| 307 | |
| 308 | void VDebug::encode_c_string(char const* arg, size_t length) |
| 309 | { |
| 310 | if (length == 0) return; |
| 311 | |
| 312 | resize_buffer_if_needed(1 + length + 1); |
| 313 | char* b = buffer(); |
| 314 | auto type_id = TupleIndex<char*, SupportedTypes>::value; |
| 315 | *reinterpret_cast<uint8_t*>(b++) = static_cast<uint8_t>(type_id); |
| 316 | memcpy(b, arg, length + 1); |
| 317 | m_bytes_used += 1 + length + 1; |
| 318 | } |
| 319 | |
| 320 | void VDebug::encode(string_literal_t arg) |
| 321 | { |