Fix types when calling PyTuple_New
Replace int with Py_ssize_t to fix warnings on Windows when using -O and/or -builtin.
This commit is contained in:
parent
dd3d04a2f2
commit
fbada9959c
2 changed files with 6 additions and 5 deletions
|
|
@ -2927,9 +2927,9 @@ public:
|
|||
Clear(f->def);
|
||||
if (overname) {
|
||||
if (noargs) {
|
||||
Printv(f->def, linkage, wrap_return, wname, "(PyObject *", self_param, ", int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {", NIL);
|
||||
Printv(f->def, linkage, wrap_return, wname, "(PyObject *", self_param, ", Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {", NIL);
|
||||
} else {
|
||||
Printv(f->def, linkage, wrap_return, wname, "(PyObject *", self_param, ", int nobjs, PyObject **swig_obj) {", NIL);
|
||||
Printv(f->def, linkage, wrap_return, wname, "(PyObject *", self_param, ", Py_ssize_t nobjs, PyObject **swig_obj) {", NIL);
|
||||
}
|
||||
Printf(parse_args, "if ((nobjs < %d) || (nobjs > %d)) SWIG_fail;\n", num_required, num_arguments);
|
||||
} else {
|
||||
|
|
@ -3238,7 +3238,8 @@ public:
|
|||
DelWrapper(f);
|
||||
f = NewWrapper();
|
||||
if (funpack) {
|
||||
Printv(f->def, linkage, wrap_return, wname, "(PyObject *", self_param, ", int nobjs, PyObject **swig_obj) {", NIL);
|
||||
// Note: funpack is currently always false for varargs
|
||||
Printv(f->def, linkage, wrap_return, wname, "(PyObject *", self_param, ", Py_ssize_t nobjs, PyObject **swig_obj) {", NIL);
|
||||
} else {
|
||||
Printv(f->def, linkage, wrap_return, wname, "(PyObject *", self_param, ", PyObject *args) {", NIL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue