Commit Graph

4 Commits

Author SHA1 Message Date
Petr Viktorin fa143fa994
PEP 697: Changes based on initial implementation & docs (GH-2906)
* PEP 697: Changes based on initial implementation & docs

- Use a flag, `Py_TPFLAGS_ITEMS_AT_END`, rather than a slot. This way the subclass doesn't need to worry about items (if the superclass is set up right).
- The result of `PyObject_GetTypeDataSize` may be higher than requested by -basicsize (e.g. due to alignment). It is safe to use all of it (e.g. with memset).
- Mention that `basicsize == 0` and `itemsize == 0` already work. I’ll add explicit docs & tests though.
- Add link to initial implementation
- Add endorsements
- Add a “big picture” decision tree
- Rewording
- Mention possible flags for alternative item layouts

* Apply suggestions from code review

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-12-01 16:55:12 +01:00
Petr Viktorin eb65647442
PEP 697: Add Post-History & Discussions-To (#2827) 2022-10-12 11:19:49 +02:00
Petr Viktorin 139672b8c7
PEP 697: Rewrite (#2814)
Rewrite the motivation/rationale.
The actual proposal stays nearly the same.
2022-10-06 12:59:06 +02:00
Petr Viktorin e7446a16eb
PEP 697 (new): C-API for Extending Opaque Types (#2772) 2022-08-31 11:35:53 +02:00