summaryrefslogtreecommitdiff
path: root/src/pkstr.hpp
blob: 0f2fb0d36b6fe3d22d301f0eabd94ff05b349fd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 */