| 704 | } |
| 705 | |
| 706 | int32_t ExInt64DivFunc(lua_State *L) { |
| 707 | int32_t argc = lua_gettop(L); /* number of arguments */ |
| 708 | if (argc != 2) { |
| 709 | return RetFalse("argc error\n"); |
| 710 | } |
| 711 | |
| 712 | if (!lua_isinteger(L, 1)) { |
| 713 | return RetFalse("Int64Div para1 error\n"); |
| 714 | } |
| 715 | int64_t a = lua_tointeger(L, 1); |
| 716 | |
| 717 | if (!lua_isinteger(L, 2)) { |
| 718 | return RetFalse("Int64Div para2 error\n"); |
| 719 | } |
| 720 | int64_t b = lua_tointeger(L, 2); |
| 721 | |
| 722 | int64_t c = 0; |
| 723 | LUA_BurnFuncCall(L, FUEL_CALL_Int64Div, BURN_VER_R2); |
| 724 | if (!SafeDivide(a, b, c)) { |
| 725 | return RetFalse("Int64Div Operate overflow !\n"); |
| 726 | } |
| 727 | |
| 728 | lua_pushinteger(L, c); |
| 729 | return 1; |
| 730 | } |
| 731 | |
| 732 | /** |
| 733 | *bool SHA256(void const* pfrist, const uint16_t len, void * const pout) |
nothing calls this directly
no test coverage detected