[Python-Dev] Re: [Bug #121013] Bug in <stringobject>.join(<unicodestring>)
Tue, 28 Nov 2000 12:32:22 +0100
> > Since not using PySequence_Fast() to initialize the protocol,
> > I'd suggest doing a Py_FatalError() with some explanatory
> > text which gets printed to stderr -- still better than a
> > segfault at some later point due to some dangling pointers...
> So you'd want PySequence_Fast_GETITEM to look like
> #define PySequence_Fast_GETITEM(s,i) \
> (PyList_Check((s)) ? PyList_GET_ITEM((s),(i)) : \
> (PyTuple_Check((s))? PyTuple_GET_ITEM((s),(i)) : \
> Py_FatalError("muffin!") ))
> ? That'd probably be fair
sorry, but that's just silly -- the function is called GET_ITEM,
it's no less safe than PyList_GET_ITEM or PyTuple_GET_ITEM or
any other "trade speed for safety" macro.