Hm, then perhaps rangeobject.c shouldn't use it? On 9/8/07, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >> Why is _PyLong_FitsInLong private? > > > > I don't know; perhaps because it doesn't always give the best answer. > > Its sole purpose is to support PyInt_CheckExact. There is some code > that relies that after PyInt_CheckExact succeeds, it is safe to do > PyInt_AsLong. When I defined PyInt_CheckExact to PyLong_CheckExact, > such code would break. Adding this "conservative" estimate allowed > that code to work when the macro was true. As this occurs in some > time-critical places, I did not want to waste time with computing a > correct result. > > Regards, > Martin >
-- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
