This commit is contained in:
blueloveTH 2023-10-15 22:14:34 +08:00
parent f41368afbb
commit ab53927019
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ enum CompileMode {
};
struct SourceData {
Str source;
std::string source; // assume '\0' terminated
Str filename;
std::vector<const char*> line_starts;
CompileMode mode;

View File

@ -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;
}