| 301 | } |
| 302 | |
| 303 | HOSTDEVICE static inline const char *PD_PString_GetDataPointer( |
| 304 | const PD_PString *str) { |
| 305 | switch (PD_PString_GetType(str)) { |
| 306 | case PD_PSTR_SMALL: |
| 307 | return str->u.small.str; |
| 308 | case PD_PSTR_LARGE: |
| 309 | return str->u.large.ptr; |
| 310 | case PD_PSTR_OFFSET: |
| 311 | return (const char *)str + str->u.offset.offset; // NOLINT |
| 312 | case PD_PSTR_VIEW: |
| 313 | return str->u.view.ptr; |
| 314 | default: |
| 315 | // Unreachable. |
| 316 | return NULL; // NOLINT |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | HOSTDEVICE static inline char *PD_PString_ResizeUninitialized(PD_PString *str, |
| 321 | size_t new_size) { |
no outgoing calls
no test coverage detected