MCPcopy Create free account
hub / github.com/Kitware/VTK / vtk_Py_WideToUTF8

Function vtk_Py_WideToUTF8

Utilities/PythonInterpreter/vtkPythonInterpreter.cxx:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101
102#if PY_VERSION_HEX < 0x03080000
103std::string vtk_Py_WideToUTF8(const wchar_t* arg)
104{
105 std::string result;
106 size_t length = vtksysEncoding_wcstombs(nullptr, arg, 0);
107 if (length > 0)
108 {
109 std::vector<char> chars(length + 1);
110 vtksysEncoding_wcstombs(chars.data(), arg, length + 1);
111 result.assign(chars.data(), length);
112 }
113
114 return result;
115}
116#endif
117
118std::vector<vtkWeakPointer<vtkPythonInterpreter>>* GlobalInterpreters;

Callers 1

SetupPythonPathsFunction · 0.85

Calls 2

dataMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected