Repository navigation
Commit 3e06b4f
Add Py_tp_token support to xxlimited module
Implement the TODO at line 99-100 to add Py_tp_token slot support,
demonstrating Python 3.14 type checking best practices for Limited
C API extension modules.
Changes to Modules/xxlimited.c:
- Update Limited API version from 3.13 (0x030d0000) to 3.14 (0x030e0000)
- Add Py_tp_token slot with Py_TP_USE_SPEC to Xxo_Type_slots
- Add brief comment with links to PEP 630 and documentation
Changes to Doc/howto/isolating-extensions.rst:
- Add new "Type Checking with Heap Types" section documenting Py_tp_token
- Update "Open Issues" to note that type checking was resolved in 3.14
- Reference xxlimited.c as example and link to pythongh-124153
This addresses the type-checking problem for heap types described in
PEP 630 and aligns with the documentation modernization effort
(pythongh-134160). The xxlimited module now serves as a complete example
of modern isolated extension module development.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8be3b2f commit 3e06b4f
2 files changed
Lines changed: 41 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
609 | 637 | | |
610 | 638 | | |
611 | 639 | | |
| |||
628 | 656 | | |
629 | 657 | | |
630 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
631 | 665 | | |
632 | 666 | | |
633 | 667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
| |||
298 | 296 | | |
299 | 297 | | |
300 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
301 | 304 | | |
302 | 305 | | |
303 | 306 | | |
| |||
0 commit comments