mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-07-26 21:03:05 +08:00
⚡ optimize code & chdir will not trigger crash if failed to call
This commit is contained in:
+1
-1
@@ -142,7 +142,7 @@ struct nas_upval
|
||||
std::vector<nas_ref> elems;
|
||||
|
||||
nas_upval(){onstk=true;stk=nullptr;size=0;}
|
||||
nas_ref& operator[](const int i){return onstk?stk[i]:elems[i];}
|
||||
nas_ref& operator[](usize n){return onstk?stk[n]:elems[n];}
|
||||
void clear(){onstk=true;elems.clear();size=0;}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user