Enumerate can not receive any integer in pike 7.9

Changed so that the length of the string is verified to smaller than
2147483647 before continuing to silence warnings.