Message379691
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2020年10月26日.21:59:37 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1603749577.35.0.864358738107.issue42161@roundup.psfhosted.org> |
| In-reply-to |
| Content |
In bpo-38858, I made the small integer singletons per interpreter: commit 630c8df5cf126594f8c1c4579c1888ca80a29d59. _PyLong_Zero and _PyLong_One variables are still shared by all interpreters, whereas subinterpreters must not share Python objects: see bpo-40533.
I propose to add new _PyLong_GetZero() and _PyLong_GetOne() functions to replace _PyLong_Zero and _PyLong_One variables. These functions will retrieve the singletons from tstate->interp->small_ints. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2020年10月26日 21:59:37 | vstinner | set | recipients:
+ vstinner |
| 2020年10月26日 21:59:37 | vstinner | set | messageid: <1603749577.35.0.864358738107.issue42161@roundup.psfhosted.org> |
| 2020年10月26日 21:59:37 | vstinner | link | issue42161 messages |
| 2020年10月26日 21:59:37 | vstinner | create |
|