chaokunyang commented on PR #1997: URL: https://github.com/apache/fury/pull/1997#issuecomment-2575342567
 @penguin-wwy this is how pickle deserialize string. maybe we need to implement a special _PyUnicode_FromUCS1 in pyfury : ```c // unicodeobject.c static PyObject *_PyUnicode_FromUCS1(const Py_UCS1 *u, Py_ssize_t size) { PyObject *res; unsigned char max_char; if (size == 0) _Py_RETURN_UNICODE_EMPTY(); assert(size > 0); if (size == 1) return get_latin1_char(u[0]); max_char = ucs1lib_find_max_char(u, u + size); res = PyUnicode_New(size, max_char); if (!res) return NULL; memcpy(PyUnicode_1BYTE_DATA(res), u, size); assert(_PyUnicode_CheckConsistency(res, 1)); return res; } ``` I didn't find `ucs1lib_find_max_char` in cpython 3.8/3.9, do you know where is this function be implemented? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
