Updated the type of integers from int to ptrdiff_t to match Lua typedefs.