Message38769
Logged In: YES
user_id=4631
I can post a new diff for the // or would you be willing to
just change the patch you have?
I cannot use the same macros for Py_SET_ERANGE_IF_OVERFLOW
(X) because Wince doesn't have ERANGE. You'll note the use
of Py_SetErrno(1) which is frankly bogus. This is related
to your comment on Py_ClearErrno()
Using (errno == 0) as meaning "no error" seems to me to be
a python source "convention" forced on it by (mostly)
floating point side effects. Because the math routines are
indicating overflow errors through the side effect of
setting errno (rather than returning an explicit NaN that
works on all platforms), we must set errno = 0 before
calling these math functions.
I suppose it's possible that on some platform "clearing the
last error value" wouldn't be done this way, but rather
might be an explicit function call. Since I was going
through the source looking for all errno's, I felt it was
clearer to say Py_ClearErrno() rather than Py_SetErrno(0),
even though in the end they do the same thing on currently
supported platforms.
I'm easy, if you want to replace Py_ClearErrno() with
Py_SetErrno(0) I can do that too.
--
Regarding goto targets.. is it likely that "cleanup" might
also collide with local variables? would _cleanup or
__cleanup work for you?
|
|
Date |
User |
Action |
Args |
2007-08-23 15:10:40 | admin | link | issue505846 messages |
2007-08-23 15:10:40 | admin | create | |
|