Fix the high passed to PyTuple_GetSlice in varargs wrappers.
Harmless bug as slices can take any size larger than the actual size for the high value. Reported in SF Bug 1326.
This commit is contained in:
parent
6e794da3f3
commit
0f1e3da5de
3 changed files with 10 additions and 3 deletions
|
|
@ -2614,7 +2614,7 @@ public:
|
|||
Printf(f->code, "}\n");
|
||||
} else {
|
||||
Printf(f->code, "newargs = PyTuple_GetSlice(args,0,%d);\n", num_fixed_arguments);
|
||||
Printf(f->code, "varargs = PyTuple_GetSlice(args,%d,PyTuple_Size(args)+1);\n", num_fixed_arguments);
|
||||
Printf(f->code, "varargs = PyTuple_GetSlice(args,%d,PyTuple_Size(args));\n", num_fixed_arguments);
|
||||
}
|
||||
Printf(f->code, "resultobj = %s__varargs__(%s,newargs,varargs);\n", wname, builtin ? "self" : "NULL");
|
||||
Append(f->code, "Py_XDECREF(newargs);\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue