Commit 396058a
patch 9.0.2036: if_python: rework python3.12 build dependency
Problem: if_python: rework python3.12 build dependency
(after 9.0.1996)
Solution: use PyTuple_Size instead of inlining the Py_SIZE
into the Vim code base
Use a simpler fix for Python 3.12 build issues
Python 3.12 introduced link dependencies to their `Py_SIZE()` inline
function, which #13290 fixed by copying the inline function to Vim's
Python binding code. This works but it's fragile, as a future update may
change the implementation of `Py_SIZE` and there is no way for us to
know.
The reason we need `Py_SIZE` to begin with is that we use
`PyTuple_GET_SIZE()` which calls that. Just fix it by mapping that to
(confusingly similarly named) `PyTuple_Size()`, which we already do in
the stable ABI implementation. There's a minor performance cost in that
it's not inlined and it does error checking but that's fine as we only
call this function rarely (in an error handler).
related: #13290
closes: #13359
Signed-off-by: Christian Brabandt <[email protected]>
Co-authored-by: Yee Cheng Chin <[email protected]>1 parent 8f4fb00 commit 396058a
2 files changed
+8
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | 302 | | |
306 | 303 | | |
307 | 304 | | |
| |||
501 | 498 | | |
502 | 499 | | |
503 | 500 | | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | 501 | | |
508 | 502 | | |
509 | 503 | | |
| |||
701 | 695 | | |
702 | 696 | | |
703 | 697 | | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | 698 | | |
708 | 699 | | |
709 | 700 | | |
| |||
795 | 786 | | |
796 | 787 | | |
797 | 788 | | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
820 | 793 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
| 794 | + | |
829 | 795 | | |
830 | | - | |
| 796 | + | |
831 | 797 | | |
832 | 798 | | |
833 | 799 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
704 | 704 | | |
705 | 705 | | |
706 | 706 | | |
| 707 | + | |
| 708 | + | |
707 | 709 | | |
708 | 710 | | |
709 | 711 | | |
| |||
0 commit comments