More work on moving engine into dlmalloc heap
This commit is contained in:
@@ -8,10 +8,9 @@
|
||||
#include "luastack.hpp"
|
||||
#include "util.hpp"
|
||||
|
||||
|
||||
namespace drv {
|
||||
|
||||
void split_host_port(std::string_view target, drv::string &host, drv::string &port) {
|
||||
void split_host_port(std::string_view target, std::string &host, std::string &port) {
|
||||
size_t lastcolon = target.rfind(':');
|
||||
if (lastcolon == std::string_view::npos) {
|
||||
host = ""; port = ""; return;
|
||||
@@ -23,8 +22,8 @@ void split_host_port(std::string_view target, drv::string &host, drv::string &po
|
||||
}
|
||||
}
|
||||
|
||||
drv::vector<drv::string> parse_control_lst(std::string_view ctrl) {
|
||||
drv::vector<drv::string> result;
|
||||
std::vector<std::string> parse_control_lst(std::string_view ctrl) {
|
||||
std::vector<std::string> result;
|
||||
while (!ctrl.empty()) {
|
||||
std::string_view line = util::sv_read_line(ctrl);
|
||||
std::string_view trimmed = util::sv_trim(line);
|
||||
@@ -40,7 +39,7 @@ drv::vector<drv::string> parse_control_lst(std::string_view ctrl) {
|
||||
|
||||
LuaDefine(unittests_driverutil, "", "some unit tests") {
|
||||
// Test split_host_port
|
||||
drv::string host, port;
|
||||
std::string host, port;
|
||||
drv::split_host_port("stanford.edu:80", host, port);
|
||||
LuaAssertStrEq(L, host, "stanford.edu");
|
||||
LuaAssertStrEq(L, port, "80");
|
||||
|
||||
Reference in New Issue
Block a user