Message407676
| Author |
ronaldoussoren |
| Recipients |
docs@python, ronaldoussoren |
| Date |
2021年12月04日.16:32:04 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1638635524.2.0.650786330944.issue45983@roundup.psfhosted.org> |
| In-reply-to |
| Content |
The documentation for PyType_Spec and the related functions is not clear about the required lifetime of fields of PyType_Spec.
In particular, PyType_Spec.name must remain valid for the entire lifetime of types created with PyType_FromSpec*. The documentation doesn't mention this.
I ran into this with code that calculates the name as needed an cleans up the memory used for the type spec after creating the type. The type appears to work fine when looking at it in Python scripts, but the tp_name slot is wrong. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2021年12月04日 16:32:04 | ronaldoussoren | set | recipients:
+ ronaldoussoren, docs@python |
| 2021年12月04日 16:32:04 | ronaldoussoren | set | messageid: <1638635524.2.0.650786330944.issue45983@roundup.psfhosted.org> |
| 2021年12月04日 16:32:04 | ronaldoussoren | link | issue45983 messages |
| 2021年12月04日 16:32:04 | ronaldoussoren | create |
|