mirror of
https://codeberg.org/scip/rpnc.git
synced 2025-12-17 20:41:01 +01:00
better switch
This commit is contained in:
@@ -116,9 +116,7 @@ func (i *Interpreter) CallLuaFunc(funcname string, items []float64) (float64, er
|
||||
funcname, LuaFuncs[funcname].numargs))
|
||||
|
||||
switch LuaFuncs[funcname].numargs {
|
||||
case 0:
|
||||
fallthrough
|
||||
case 1:
|
||||
case 0, 1:
|
||||
// 1 arg variant
|
||||
if err := LuaInterpreter.CallByParam(lua.P{
|
||||
Fn: LuaInterpreter.GetGlobal(funcname),
|
||||
|
||||
Reference in New Issue
Block a user