mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-22 20:40:18 +00:00
Add the missing destructor for SourceData
C++ binding (#267)
This commit is contained in:
parent
3ae90fe9b1
commit
bcf51c4535
@ -11,6 +11,10 @@ struct SourceData : public pkpy_SourceData {
|
|||||||
pkpy_SourceData__ctor(this, source.data(), source.size(), &filename, mode);
|
pkpy_SourceData__ctor(this, source.data(), source.size(), &filename, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~SourceData() {
|
||||||
|
pkpy_SourceData__dtor(this);
|
||||||
|
}
|
||||||
|
|
||||||
std::string_view get_line(int lineno) const {
|
std::string_view get_line(int lineno) const {
|
||||||
const char *st, *ed;
|
const char *st, *ed;
|
||||||
if (pkpy_SourceData__get_line(this, lineno, &st, &ed)) {
|
if (pkpy_SourceData__get_line(this, lineno, &st, &ed)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user