Added a tostring function for bigints
This commit is contained in:
@@ -63,6 +63,9 @@ function bigint.new(num)
|
|||||||
end,
|
end,
|
||||||
__le = function(lhs, rhs)
|
__le = function(lhs, rhs)
|
||||||
return bigint.compare(lhs, rhs, "<=")
|
return bigint.compare(lhs, rhs, "<=")
|
||||||
|
end,
|
||||||
|
__tostring = function()
|
||||||
|
return bigint.unserialize(self, "s")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user