I want to create a typemap for two sequential argument types but I don't want to specify the variable names. The documentation states that this should be possible, but multi-argument typemaps only seem to work when variable names are given:
-----------------------------
%module multi_test;
/*
// Does not work
%typemap(default) (int &, int &) {
// FOUND
}
*/
// Works
%typemap(default) (int &a, int &b) {
// FOUND
}
class Foobar {
public:
Foobar();
void test(int &a, int &b);
~Foobar();
};
-----------------------------
BTW, I saw this also reported at the following URL but did not find a bug submitted for it:
http://thread.gmane.org/gmane.comp.programming.swig/8527/focus=8536
I forgot to mention that I'm using SWIG 1.3.36.
Reproduced with current git master.
Interestingly
%typemap(default) (int &a, int &) {
also works, but%typemap(default) (int &, int &b) {
doesn't.I don't see where in the docs it explicitly says that omitting the parameters should work though.
I do see this text (which has been there since before 2002 it seems):
That actually suggests to me that
%typemap(default) (int &, int &b) {
would work but not%typemap(default) (int &a, int &) {
(i.e. the opposite of the actual situation).The output with
-debug-tmsearch
shows the typemaps don't match when they don't match, but doesn't help me understand why not.