| 678 | } |
| 679 | |
| 680 | int32_t ExInt64SubFunc(lua_State *L) { |
| 681 | int32_t argc = lua_gettop(L); /* number of arguments */ |
| 682 | if (argc != 2) { |
| 683 | return RetFalse("argc error\n"); |
| 684 | } |
| 685 | |
| 686 | if (!lua_isinteger(L, 1)) { |
| 687 | return RetFalse("Int64Sub para1 error\n"); |
| 688 | } |
| 689 | int64_t a = lua_tointeger(L, 1); |
| 690 | |
| 691 | if (!lua_isinteger(L, 2)) { |
| 692 | return RetFalse("Int64Sub para2 error\n"); |
| 693 | } |
| 694 | int64_t b = lua_tointeger(L, 2); |
| 695 | |
| 696 | int64_t c = 0; |
| 697 | LUA_BurnFuncCall(L, FUEL_CALL_Int64Sub, BURN_VER_R2); |
| 698 | if (!SafeSubtract(a, b, c)) { |
| 699 | return RetFalse("Int64Sub Operate overflow !\n"); |
| 700 | } |
| 701 | |
| 702 | lua_pushinteger(L, c); |
| 703 | return 1; |
| 704 | } |
| 705 | |
| 706 | int32_t ExInt64DivFunc(lua_State *L) { |
| 707 | int32_t argc = lua_gettop(L); /* number of arguments */ |
nothing calls this directly
no test coverage detected