> How about this: we add a wchar_t codec to Python and the "eu#" parser > marker. Then you could write: > > wchar_t value = NULL; > int len = 0; > if (PyArg_ParseTuple(tuple, "eu#", "wchar_t", &value, &len) < 0) > return NULL; Wouldn't that code be incorrect if there are further format argument whose conversion could fail also? I think format specifiers that require explicit memory management are so difficult to use that they must be avoided. I'd be in favour of extending the argtuple type to include additional slots for objects that go away when the tuple goes away. Regards, Martin
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