Commit 93b525f
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
Changes to Doc/howto/isolating-extensions.rst:
- Add new "Type Checking with Heap Types" section documenting Py_tp_token
- Reference xxlimited.c as example and link to gh-124153
This addresses the type-checking problem for heap types described in
PEP 630 and aligns with the documentation modernization effort
(gh-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 93b525f
2 files changed
+31
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
343 | 371 | | |
344 | 372 | | |
345 | 373 | | |
| |||
| 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 | + | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
| |||
0 commit comments