v.gen.js: fix references and add iterator to map (#10938)

This commit is contained in:
playX 2021-07-24 15:35:17 +03:00 committed by GitHub
parent 45a15755b8
commit f51fa7e665
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 54 additions and 21 deletions

View file

@ -8,7 +8,9 @@ struct map {
// Removes the mapping of a particular key from the map.
[unsafe]
pub fn (mut m map) delete(key voidptr) {
#m.m.delete(key)
#m.map.delete(key)
}
pub fn (m &map) free() {}
#map.prototype[Symbol.iterator] = function () { return this.map[Symbol.iterator](); }