MCPcopy Create free account
hub / github.com/carbonengine/trinity / ToPyUnicode

Function ToPyUnicode

trinity/Tr2LabelTextParser.cpp:26–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24namespace
25{
26PyObject* ToPyUnicode( const wchar_t* str, Py_ssize_t size )
27{
28#if PY_MAJOR_VERSION == 2
29 return PyUnicode_FromUnicode( reinterpret_cast<const Py_UNICODE*>( str ), size );
30#else
31 return PyUnicode_FromWideChar( str, size );
32#endif
33}
34PyObject* ToPyUnicode( const wchar_t* str )
35{
36#if PY_MAJOR_VERSION == 2

Callers 3

ParseAttribsFunction · 0.85
PyParseLabelTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected