MCPcopy Create free account
hub / github.com/mhammond/pywin32 / PyWinCoreString_FromString

Function PyWinCoreString_FromString

win32/src/PyUnicode.cpp:102–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102PyObject *PyWinCoreString_FromString(const char *str, Py_ssize_t len /*=(Py_ssize_t)-1*/)
103{
104 if (len==(Py_ssize_t)-1)
105 len = strlen(str);
106#if (PY_VERSION_HEX < 0x03000000)
107 return PyString_FromStringAndSize(str, len);
108#else
109 return PyUnicode_DecodeMBCS(str, len, "ignore");
110#endif
111}
112
113PyObject *PyWinCoreString_FromString(const WCHAR *str, Py_ssize_t len /*=(Py_ssize_t)-1*/)
114{

Callers 15

Python_do_int_callbackFunction · 0.85
PYWIN_MODULE_INIT_FUNCFunction · 0.85
tp_reprMethod · 0.85
getattroMethod · 0.85
tp_richcompareMethod · 0.85
reprMethod · 0.85
PyObject_FromPROPVARIANTFunction · 0.85
printMethod · 0.85
asStrMethod · 0.85
ReturnRasErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected