diff options
Diffstat (limited to 'src/pkstr.hpp')
| -rw-r--r-- | src/pkstr.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pkstr.hpp b/src/pkstr.hpp new file mode 100644 index 0000000..0f2fb0d --- /dev/null +++ b/src/pkstr.hpp @@ -0,0 +1,20 @@ +#ifndef PKE_STRING_HPP +#define PKE_STRING_HPP + +#include <cstdint> + +struct pkstr { + int64_t length = 0; + char *val = nullptr; +}; +struct cpkstr { + int64_t length = 0; + const char *val = nullptr; +}; + +pkstr to_pkstr(char *s); +pkstr to_pkstr(const cpkstr &s); +cpkstr to_cpkstr(const char *s); +cpkstr to_cpkstr(const pkstr &s); + +#endif /* PKE_STRING_HPP */ |
