title: SWIG typemap with C++ overloaded function
body: <p>I have a function definition like so:</p>
  
  <p>void Foo(int szData,int Data[]);</p>
  
  <p>and I have a SWIG typemap like so:</p>
  
  <pre><code>%typemap(in) (int szData,int Data[])
  {
    int i; 
    if (!PyTuple_Check($input))
    {
        PyErr_SetString(PyExc_TypeError,"Expecting a tuple for this parameter");
        $1 = 0;
    }
    else
      $1 = PyTuple_Size($input);
    $2 = (int *) malloc(($1+1)*sizeof(int));
    for (i =0; i &lt; $1; i++)
    {
        PyObject *o = PyTuple_GetItem($input,i);
        if (!PyInt_Check(o))
        {
           free ($2);
           PyErr_SetString(PyExc_ValueError,"Expecting a tuple of integers");
           return NULL;
        }
        $2[i] = PyInt_AsLong(o);
    }
    $2[i] = 0;
  }
  </code></pre>
  
  <p>The typemap allows me to call Foo() from Python like so:
  Foo((1,2,3))</p>
  
  <p>This works perfectly well until I add an overloaded function, such as:
  int Foo(double t);</p>
  
  <p>Everything builds fine, but now when I call Foo() from Python I get:</p>
  
  <pre><code>NotImplementedError: Wrong number or type of arguments for overloaded function 'Foo'.
    Possible C/C++ prototypes are:
      Foo(int,int [])
      Foo(double)
  </code></pre>
  
  <p>If I remove the typemap(in) then it works OK as well.</p>
  
  <p>Appreciate if anyone has any ideas as I am totally stumped...</p>