| 265 | } |
| 266 | |
| 267 | HOSTDEVICE static inline void PD_PString_Dealloc(PD_PString *str) { |
| 268 | if (PD_PString_GetType(str) == PD_PSTR_LARGE && |
| 269 | str->u.large.ptr != NULL) { // NOLINT |
| 270 | PD_Free(str->u.large.ptr, str->u.large.cap + 1); |
| 271 | PD_PString_Init(str); |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | HOSTDEVICE static inline size_t PD_PString_GetSize(const PD_PString *str) { |
| 276 | switch (PD_PString_GetType(str)) { |
no test coverage detected