Add the missing destructor for SourceData C++ binding

This commit is contained in:
方而静 2024-06-12 09:33:52 +08:00
parent 3ae90fe9b1
commit 083f764176

View File

@ -11,6 +11,10 @@ struct SourceData : public pkpy_SourceData {
pkpy_SourceData__ctor(this, source.data(), source.size(), &filename, mode);
}
~SourceData() {
pkpy_SourceData__dtor(this);
}
std::string_view get_line(int lineno) const {
const char *st, *ed;
if (pkpy_SourceData__get_line(this, lineno, &st, &ed)) {