8000 gh-119182: Add PyUnicodeWriter_WriteUCS4() function by vstinner · Pull Request #120849 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119182: Add PyUnicodeWriter_WriteUCS4() function #120849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use PyUnicodeWriter_WriteUCS4() on Solaris
  • Loading branch information
vstinner committed Jun 24, 2024
commit e18a47c3a708d5b0723b7945eb496cc720c2aa3f
6 changes: 2 additions & 4 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2035,11 +2035,9 @@
if (!converted) {
return -1;
}
PyObject *unicode = _PyUnicode_FromUCS4(converted, size);
PyMem_Free(converted);

int res = _PyUnicodeWriter_WriteStr(writer, unicode);
Py_DECREF(unicode);
int res = PyUnicodeWriter_WriteUCS4(pub_writer, converted, size);
PyMem_Free(converted);
return res;
}
#endif
Expand Down Expand Up @@ -2300,7 +2298,7 @@
if (size < 0) {
PyErr_SetString(PyExc_TypeError,
"size must be positive");
return NULL;

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Address sanitizer

returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Ubuntu SSL tests with OpenSSL (1.1.1w)

returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Ubuntu SSL tests with OpenSSL (3.0.13)

returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Ubuntu SSL tests with OpenSSL (3.1.5)

returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Ubuntu SSL tests with OpenSSL (3.2.1)

returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test

returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test

returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / build and test (x64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / build and test (x64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / build (arm64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check warning on line 2301 in Objects/unicodeobject.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / build (arm64)

'return': 'int' differs in levels of indirection from 'void *' [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj]
}

if (size == 0) {
Expand Down
Loading
0