Message46731
Trying to use the struct module's 'P' format with a
non-numeric arguments yields a SystemError. When the P
format was implemented in rev 2.28, the get_pylong helper
wasn't available, so it was less obvious how do this
right. Now that the helper is available, it's straight-
forward to use it to ensure proper error reporting instead
of rolling our own. Interestingly, the comment in np_void_p
indicates that the author knew about this problem; my guess
is that they intended to fix it by changing PyLong_AsVoidPtr
to generate TypeError instead, but SystemError is the right
thing to do because it's consistent with the rest of the C
API, and get_pylong deals with this properly.
References: structmodule.c 2.28 and 2.47 |
|
Date |
User |
Action |
Args |
2007-08-23 15:39:27 | admin | link | issue1011240 messages |
2007-08-23 15:39:27 | admin | create | |
|