PyUnicode_FromUnicode

Create a Unicode Object from the Py_UNICODE buffer u of the given size.

u may be NULL which causes the contents to be undefined. It is the user's responsibility to fill in the needed data afterwards. Note that modifying the Unicode object contents after construction is only allowed if u was set to NULL.

Availability: >= 2.6 The buffer is copied into the new object.

  1. PyObject* PyUnicode_FromUnicode(Py_UNICODE* u, Py_ssize_t size)
  2. alias PyUnicode_FromUnicode = PyUnicodeUCS2_FromUnicode
  3. alias PyUnicode_FromUnicode = PyUnicodeUCS4_FromUnicode
    version(!Python_3_3_Or_Later && !Python_Unicode_UCS2 && Python_2_6_Or_Later)
    extern (C)
    alias PyUnicode_FromUnicode = PyUnicodeUCS4_FromUnicode

Meta