[Python-Dev] 2.2a3 oddities
Tim Peters
tim.one@home.com
Sat, 8 Sep 2001 23:43:04 -0400
[Guido]
> This crashes on Linux too. This patch fixes it, but I'm not sure if
> that's right -- more eyes, please? (Maybe the fix is simpler and it
> should just replace the test for Py_None with a test for NULL?)
Well, converterr gets called from 56(!) places, and I spaced out after
looking at 10 of them. Still, I can't imagine that removing the Py_None
test could hurt anything, and a NULL test is definitely needed.
> Index: getargs.c
> ===================================================================
> RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v
> retrieving revision 2.63
> diff -c -r2.63 getargs.c
> *** getargs.c 2001/08/28 16:37:51 2.63
> --- getargs.c 2001/09/07 19:56:21
> ***************
> *** 369,374 ****
> --- 369,375 ----
> {
> assert (expected != NULL);
> sprintf(msgbuf, "must be %.50s, not %.50s", expected,
> + arg == NULL ? "NULL" :
> arg == Py_None ? "None" : arg->ob_type->tp_name);
> return msgbuf;
> }