michael wrote: > > 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, not GetItem. it's no less safe than PyList_GET_ITEM or PyTuple_GET_ITEM or any other "trade speed for safety" macro. </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4