Fix memory leak in require (#6790)

* Fix memory leak in require() and add test

* Mark fixtures as generated code

* Add optimization for large files

* Fix small memory leak

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
Jarred Sumner
2023-10-30 23:54:02 -07:00
committed by GitHub
parent 715be35764
commit b29d68bbaf
20 changed files with 2890 additions and 47 deletions

View File

@@ -846,6 +846,10 @@ pub const String = extern struct {
}
}
pub fn eqlUTF8(this: String, other: []const u8) bool {
return this.toZigString().eql(ZigString.initUTF8(other));
}
pub fn eql(this: String, other: String) bool {
return this.toZigString().eql(other.toZigString());
}