| 1333 */ |
1333 */ |
| 1334 CX_EXTERN CX_NONNULL CX_NODISCARD CX_ACCESS_W(2) |
1334 CX_EXTERN CX_NONNULL CX_NODISCARD CX_ACCESS_W(2) |
| 1335 bool cx_strtok_next_(CxStrtokCtx *ctx, cxstring *token); |
1335 bool cx_strtok_next_(CxStrtokCtx *ctx, cxstring *token); |
| 1336 |
1336 |
| 1337 #ifdef __cplusplus |
1337 #ifdef __cplusplus |
| 1338 CX_CPPDECL cx_strtok_next(CxStrtokCtx *ctx, cxstring *token) { |
1338 CX_CPPDECL bool cx_strtok_next(CxStrtokCtx *ctx, cxstring *token) { |
| 1339 return cx_strtok_next_(ctx, token); |
1339 return cx_strtok_next_(ctx, token); |
| 1340 } |
1340 } |
| 1341 CX_CPPDECL cx_strtok_next(CxStrtokCtx *ctx, cxmutstr *token) { |
1341 CX_CPPDECL bool cx_strtok_next(CxStrtokCtx *ctx, cxmutstr *token) { |
| 1342 // Note: this is actually UB - fixed with start_lifetime_as() in C++23 |
1342 // Note: this is actually UB - fixed with start_lifetime_as() in C++23 |
| 1343 // but it works on all supported platforms |
1343 // but it works on all supported platforms |
| 1344 return cx_strtok_next_(ctx, reinterpret_cast<cxstring*>(token)); |
1344 return cx_strtok_next_(ctx, reinterpret_cast<cxstring*>(token)); |
| 1345 } |
1345 } |
| 1346 #else // ! __cplusplus |
1346 #else // ! __cplusplus |