title: How to extend C void function to python using SWIG?
body: <p>If I have a C function like this:</p>
  
  <pre><code>y = myfunc(x){
     y = x + 2;
  }
  </code></pre>
  
  <p>I know how to write the *.i file and make the above function callable in Python. But if I have a C function like this:</p>
  
  <pre><code>void encode(int x[], int len, int y[]){
       int i;
       for (i=0; i&lt;len; i++){
           y[i] = x[i] * 2;
       }
  }
  </code></pre>
  
  <p>I do not know how to write the *.i interface and failed to find over the internet. Anyone could give me some hint?</p>