Repository navigation
Commit e9ce7b0
committed
golang: Fix XPyFrame_WhiteoutFastLocal for py3.14
Problem 1:
golang/_golang.cpp: In function ‘void XPyFrame_WhiteoutFastLocal(PyFrameObject*, PyObject*)’:
golang/_golang.cpp:1572:43: error: invalid use of incomplete type ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
1572 | f->f_frame->localsplus;
| ^~
In file included from /home/kirr/local/py3.14/include/python3.14/pyframe.h:19,
from /home/kirr/local/py3.14/include/python3.14/Python.h:113,
from golang/_golang.cpp:150:
/home/kirr/local/py3.14/include/python3.14/cpython/pyframe.h:25:8: note: forward declaration of ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’}
25 | struct _PyInterpreterFrame;
| ^~~~~~~~~~~~~~~~~~~
-> include internal/pycore_interpframe.h like we already do with e.g. internal/pycore_frame.h .
Problem 2:
golang/_golang.cpp: In function ‘void XPyFrame_WhiteoutFastLocal(PyFrameObject*, PyObject*)’:
golang/_golang.cpp:1575:45: error: cannot convert ‘_PyStackRef*’ to ‘PyObject**’ {aka ‘_object**’} in initialization
1575 | f->f_frame->localsplus;
| ~~~~~~~~~~~~^~~~~~~~~~
| |
| _PyStackRef*
It turns out _PyInterpreterFrame.localsplus was changed from PyObject to _PyStackRef:
python/cpython@22b0de2755ee2
python/cpython#118450
python/cpython#117139
-> Adjust the code to work with localsplus as _PyStackRef on py3.14+ .
/reviewed-by @jerome
/reviewed-on https://lab.nexedi.com/nexedi/pygolang/-/merge_requests/391 parent ffa1fb8 commit e9ce7b0
1 file changed
Lines changed: 25 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
964 | 964 | | |
965 | 965 | | |
966 | 966 | | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
967 | 970 | | |
968 | 971 | | |
969 | 972 | | |
| |||
1020 | 1023 | | |
1021 | 1024 | | |
1022 | 1025 | | |
1023 | | - | |
1024 | | - | |
| 1026 | + | |
| 1027 | + | |
1025 | 1028 | | |
1026 | 1029 | | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
1027 | 1034 | | |
| 1035 | + | |
1028 | 1036 | | |
1029 | 1037 | | |
1030 | 1038 | | |
| |||
1053 | 1061 | | |
1054 | 1062 | | |
1055 | 1063 | | |
1056 | | - | |
| 1064 | + | |
1057 | 1065 | | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
1058 | 1069 | | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
1059 | 1075 | | |
1060 | 1076 | | |
1061 | 1077 | | |
| |||
1064 | 1080 | | |
1065 | 1081 | | |
1066 | 1082 | | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1067 | 1087 | | |
| 1088 | + | |
1068 | 1089 | | |
1069 | 1090 | | |
1070 | 1091 | | |
| |||
0 commit comments