PyUnicode_AsWideChar

Copies the Unicode Object contents into the wchar_t buffer w. At most size wchar_t characters are copied.

Note that the resulting wchar_t string may or may not be 0-terminated. It is the responsibility of the caller to make sure that the wchar_t string is 0-terminated in case this is required by the application.

Returns the number of wchar_t characters copied (excluding a possibly trailing 0-termination character) or -1 in case of an error.

Meta