Hi all,
besides PyUnicode_(From)|(As)WideChar I haven't found specific support
for wchar_t in the python api. Is there a default codec that produces
wchar_t* (in a platform-neutral way) or something else in
PyArg_ParseTuple's format string that could help me? What encoding is
used for python's Py_UNICODE thing?
My specific problem is that I wrap an api where one function can have
as well an ansi as a unicode variant. I don't want to decide which
variant to use at compile time but rather at runtime. Therefore I
have a default argument useUnicode and if possible I want to get rid
of the
if (PyObject_IsTrue(useUnicode)) {
doTheUnicodeStuff();
...
}
else {
doTheAnsiThingWhichLooksAlmostIdenticalToTheAboveB utJustAlmost();
...
}
annoyance in almost any function.
TIA,
andreas