diff options
Diffstat (limited to 'functions.cpp')
-rw-r--r-- | functions.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/functions.cpp b/functions.cpp index 261405e..bd718f8 100644 --- a/functions.cpp +++ b/functions.cpp @@ -428,18 +428,18 @@ unordered_map<string,function<void(vector<Stackitem>&,unordered_map<string,Stack S.emplace_back(S.back().arrval.size()); }}, //leaves the array on the stack, obviously - {"push",[](vector<Stackitem> &S,unordered_map<string,Stackitem> &variables){ - BUILTIN_GUARD_STACKSIZE("push",2) + {"arrpush",[](vector<Stackitem> &S,unordered_map<string,Stackitem> &variables){ + BUILTIN_GUARD_STACKSIZE("arrpush",2) if(S[S.size()-2].type!=SIT_ARR) - throw string("Top of stack is not an array in builtin 'push'"); + throw string("Top of stack is not an array in builtin 'arrpush'"); S[S.size()-2].arrval.push_back(move(S.back())); S.pop_back(); }}, //leaves the array on the stack, obviously - {"pop",[](vector<Stackitem> &S,unordered_map<string,Stackitem> &variables){ - BUILTIN_GUARD_STACKSIZE("pop",1) + {"arrpop",[](vector<Stackitem> &S,unordered_map<string,Stackitem> &variables){ + BUILTIN_GUARD_STACKSIZE("arrpop",1) if(S.back().type!=SIT_ARR) - throw string("Top of stack is not an array in builtin 'pop'"); + throw string("Top of stack is not an array in builtin 'arrpop'"); S.back().arrval.pop_back(); }}, {"rand",[](vector<Stackitem> &S,unordered_map<string,Stackitem> &variables){ |