> > [on the user-supplies-buffer interface] > > I think this would be much less error-prone than having fixed-length buffers > > all over the place. > > PyArg_ParseTuple() should probably raise an error in case the > data doesn't fit into the buffer. Ah, that's right, that solves most of that problem. > > [on the malloced interface] > Good point. You'll still need the buffer_len output parameter > though -- otherwise you wouldn't be able tell the size of the > allocated buffer (the returned data may not be terminated). Are you sure? I would expect the "eS" format to be used to obtain 8-bit data in some local encoding, and I would expect that all 8-bit encodings of unicode data would still allow for null-termination. Or are there 8-bit encodings out there where a zero byte is normal occurrence and where it can't be used as terminator? -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm
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