Skip to content

Commit d230f68

Browse files
committed
Fix compiler errors and warnings
1 parent 382d101 commit d230f68

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

Include/internal/pycore_frame.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ static inline void _PyFrame_Copy(_PyInterpreterFrame *src, _PyInterpreterFrame *
158158
dest->stackpointer = dest->localsplus + stacktop;
159159
for (int i = 0; i < stacktop; i++) {
160160
dest->localsplus[i] = PyStackRef_MakeHeapSafe(src->localsplus[i]);
161-
PyStackRef_CheckValid(dest->localsplus[i]);
162161
}
163162

164163
#ifdef Py_GIL_DISABLED

Python/ceval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,9 +1898,9 @@ _PyEval_Vector(PyThreadState *tstate, PyFunctionObject *func,
18981898
if (kwnames) {
18991899
total_args += PyTuple_GET_SIZE(kwnames);
19001900
}
1901+
_PyStackRef stack_array[8];
19011902
_PyStackRef *arguments;
19021903
if (total_args <= 8) {
1903-
_PyStackRef stack_array[8];
19041904
arguments = stack_array;
19051905
}
19061906
else {

Python/optimizer_bytecodes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,7 @@ dummy_func(void) {
193193
{
194194
assert(PyLong_CheckExact(sym_get_const(left)));
195195
assert(PyLong_CheckExact(sym_get_const(right)));
196-
PyObject *temp = _PyLong_Add((PyLongObject *)sym_get_const(left),
197-
(PyLongObject *)sym_get_const(right));
196+
PyObject *temp = PyNumber_Add(sym_get_const(left), sym_get_const(right));
198197
if (temp == NULL) {
199198
goto error;
200199
}

0 commit comments

Comments
 (0)