Skip to content

gh-133968: Use private unicode writer for json #133832

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 11 commits into from
May 31, 2025
Prev Previous commit
Next Next commit
Restore fast path for integers
  • Loading branch information
nineteendo committed May 10, 2025
commit ab1aa4256faa93675c28dc79f64d43830f7056a7
3 changes: 3 additions & 0 deletions Modules/_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -1482,6 +1482,9 @@
return _steal_accumulate(writer, encoded);
}
else if (PyLong_Check(obj)) {
if (PyLong_CheckExact(obj)) {
return _PyLong_FormatWriter(writer, obj, 10, 0);

Check failure on line 1486 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

implicit declaration of function ‘_PyLong_FormatWriter’; did you mean ‘_PyLong_FromDigits’? [-Werror=implicit-function-declaration]

Check failure on line 1486 in Modules/_json.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

implicit declaration of function ‘_PyLong_FormatWriter’; did you mean ‘_PyLong_FromDigits’? [-Werror=implicit-function-declaration]
}
PyObject *encoded = PyLong_Type.tp_repr(obj);
if (encoded == NULL)
return -1;
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy