Explicitly refuse to wrap vararg functions

They were not supported currently, but processing them resulted in just
a warning about missing ctype typemap and generated uncompilable code.

Give an error and don't generate any code at all now, which is more
clear and helpful.

Also exclude the part of kwargs_feature test using varargs from C test
suite.
This commit is contained in:
Vadim Zeitlin 2021-10-04 21:43:33 +02:00
commit b5a8ccffa3
3 changed files with 11 additions and 0 deletions

View file

@ -127,6 +127,8 @@ struct ExtendingOptArgs1 {};
struct ExtendingOptArgs2 {};
%}
#ifndef SWIGC
// Varargs
%warnfilter(SWIGWARN_LANG_VARARGS_KEYWORD) VarargConstructor::VarargConstructor; // Can't wrap varargs with keyword arguments enabled
%warnfilter(SWIGWARN_LANG_VARARGS_KEYWORD) VarargConstructor::vararg_method; // Can't wrap varargs with keyword arguments enabled
@ -144,3 +146,5 @@ struct VarargConstructor {
}
};
%}
#endif // !SWIGC