diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2024-11-14 14:46:23 -0500 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2024-11-14 14:46:23 -0500 |
| commit | b2548ba4ce295fcd94a50123fb543fac2ef2bc33 (patch) | |
| tree | 444a32abb4a094c4fa2f7bc9a95aa86963ad4110 /src/pkstr.cpp | |
| parent | b1d926361b9d613ad712ad161f9a8b7ccab4551d (diff) | |
add pk.h and major pkmem refactor
Completely replaces the memory module with pkmem
pkmem is a newer implementation of the same
bucket memory structure.
Also includes replacing pkstr.h with pk.h's pkstr
Diffstat (limited to 'src/pkstr.cpp')
| -rw-r--r-- | src/pkstr.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/pkstr.cpp b/src/pkstr.cpp deleted file mode 100644 index 10e656c..0000000 --- a/src/pkstr.cpp +++ /dev/null @@ -1,31 +0,0 @@ - -#include "pkstr.hpp" -#include <cstring> - -pkstr to_pkstr(char *s) { - return pkstr { - .length = static_cast<int64_t>(strlen(s)), - .val = s, - }; -} - -pkstr to_pkstr(const cpkstr &s) { - return pkstr { - .length = s.length, - .val = const_cast<char *>(s.val), - }; -} - -cpkstr to_cpkstr(const char *s) { - return cpkstr { - .length = static_cast<int64_t>(strlen(s)), - .val = s, - }; -} - -cpkstr to_cpkstr(const pkstr &s) { - return cpkstr { - .length = s.length, - .val = s.val, - }; -} |
