Re: [pypy-dev] [pypy-commit] pypy default: don't raise a warning if the restype is not set, and add a test to check that we hit the fastpath even in that case
Log: don't raise a warning if the restype is not set, and add a test to check that we hit the fastpath even in that case
Uh, can we revert this? I think a runtime warning when restype is not set is an excellent idea from the correctness perspective.
Hi Maciej, On Thu, Jul 28, 2011 at 6:27 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
Uh, can we revert this? I think a runtime warning when restype is not set is an excellent idea from the correctness perspective.
I'm not sure I agree with this argument. The point I made on irc was that for function that return "void", it's common to not worry about setting restype to None, because it just works anyway. You get a c_long() object with a random value and just ignore it. It would be completely optimized away by the JIT, too. So yes, I see the point from a theoretical correctness perspective, but I think I care more about not flooding users with RuntimeWarnings in the case of ctypes... A bientôt, Armin.
participants (2)
-
Armin Rigo
-
Maciej Fijalkowski