Skip to content

Commit

Permalink
luau: use clear() instead of raw_set() to empty Luau table
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Nov 1, 2023
1 parent 4cebd7c commit 85c1e42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cmd/luau.rs
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ fn sequential_mode(
wtr.write_record(&record)?;
}
wtr.write_record(&insertrecord)?;
luau.globals().raw_set("_QSV_INSERTRECORD_TBL", "")?; // empty the table
insertrecord_table.clear()?;
},
Ok(_) | Err(_) => {
if QSV_SKIP.load(Ordering::Relaxed) {
Expand Down Expand Up @@ -1135,7 +1135,7 @@ fn random_access_mode(
wtr.write_record(&record)?;
}
wtr.write_record(&insertrecord)?;
luau.globals().raw_set("_QSV_INSERTRECORD_TBL", "")?; // empty the table
insertrecord_table.clear()?;
},
Ok(_) | Err(_) => {
if QSV_SKIP.load(Ordering::Relaxed) {
Expand Down Expand Up @@ -1363,7 +1363,7 @@ fn beginend_insertrecord(
create_insertrecord(&insertrecord_table, insertrecord, headers_count)?;

wtr.write_record(&*insertrecord)?;
luau.globals().raw_set("_QSV_INSERTRECORD_TBL", "")?; // empty the table
insertrecord_table.clear()?;
},
Ok(_) | Err(_) => {},
}
Expand Down

0 comments on commit 85c1e42

Please sign in to comment.