| 652 | } |
| 653 | |
| 654 | int32_t ExInt64AddFunc(lua_State *L) { |
| 655 | int32_t argc = lua_gettop(L); /* number of arguments */ |
| 656 | if (argc != 2) { |
| 657 | return RetFalse("argc error\n"); |
| 658 | } |
| 659 | |
| 660 | if (!lua_isinteger(L, 1)) { |
| 661 | return RetFalse("Int64Add para1 error\n"); |
| 662 | } |
| 663 | int64_t a = lua_tointeger(L, 1); |
| 664 | |
| 665 | if (!lua_isinteger(L, 2)) { |
| 666 | return RetFalse("Int64Add para2 error\n"); |
| 667 | } |
| 668 | int64_t b = lua_tointeger(L, 2); |
| 669 | |
| 670 | int64_t c = 0; |
| 671 | LUA_BurnFuncCall(L, FUEL_CALL_Int64Add, BURN_VER_R2); |
| 672 | if (!SafeAdd(a, b, c)) { |
| 673 | return RetFalse("Int64Add Operate overflow !\n"); |
| 674 | } |
| 675 | |
| 676 | lua_pushinteger(L, c); |
| 677 | return 1; |
| 678 | } |
| 679 | |
| 680 | int32_t ExInt64SubFunc(lua_State *L) { |
| 681 | int32_t argc = lua_gettop(L); /* number of arguments */ |
nothing calls this directly
no test coverage detected