From ab539270190473d41be53359a91def0f6ea27ac0 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 15 Oct 2023 22:14:34 +0800 Subject: [PATCH] ... --- include/pocketpy/error.h | 2 +- src/error.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pocketpy/error.h b/include/pocketpy/error.h index 32c06da2..4fed1c1a 100644 --- a/include/pocketpy/error.h +++ b/include/pocketpy/error.h @@ -24,7 +24,7 @@ enum CompileMode { }; struct SourceData { - Str source; + std::string source; // assume '\0' terminated Str filename; std::vector line_starts; CompileMode mode; diff --git a/src/error.cpp b/src/error.cpp index 18d71c37..544f5cb8 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -14,8 +14,8 @@ namespace pkpy{ } this->filename = filename; - this->source = std::move(ss.str()); - line_starts.push_back(this->source.begin()); + this->source = ss.str().str(); + line_starts.push_back(this->source.c_str()); this->mode = mode; }