From b2548ba4ce295fcd94a50123fb543fac2ef2bc33 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 14 Nov 2024 14:46:23 -0500 Subject: 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 --- src/pkstr.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/pkstr.cpp (limited to 'src/pkstr.cpp') 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 - -pkstr to_pkstr(char *s) { - return pkstr { - .length = static_cast(strlen(s)), - .val = s, - }; -} - -pkstr to_pkstr(const cpkstr &s) { - return pkstr { - .length = s.length, - .val = const_cast(s.val), - }; -} - -cpkstr to_cpkstr(const char *s) { - return cpkstr { - .length = static_cast(strlen(s)), - .val = s, - }; -} - -cpkstr to_cpkstr(const pkstr &s) { - return cpkstr { - .length = s.length, - .val = s.val, - }; -} -- cgit v1.2.3