title: Method without return value in python c extension module
body: <p>I'm trying to create a script in python that sends data through a parallel port. I'm creating my own module in C language.</p>
  
  <p>The problem is: when I try to execute my module, python crashes. No errors, no data, nothing. It simply closes.</p>
  
  <p>This is my module:</p>
  
  <pre class="lang-c prettyprint-override"><code>#include &lt;Python.h&gt;
  #include &lt;sys/io.h&gt;
  #define BaseAddr 0x378
  
  /*----------------------------------------------------------------------------------
  Este es un módulo destinado a controlar el puerto paralelo.
  Probablemente tenga que ser ejecutado como administrador.
  
  Created by markmb
  ------------------------------------------------------------------------------------*/
  
  static PyObject *
  paralelo(PyObject *self, PyObject *args){
      int pin;
      ioperm(BaseAddr,3,1);
      if (!PyArg_ParseTuple(args, "i", &amp;pin))
          return NULL;
      outb(pin,BaseAddr);
      ioperm(BaseAddr,3,0);
      return 1
  }
  PyMethodDef methods[] = {
      {"paralelo", paralelo, METH_VARARGS, "Sends data through a parallel port"},
      {NULL, NULL, 0, NULL}
  };
  PyMODINIT_FUNC
  initparalelo(void){
      (void) Py_InitModule("paralelo", methods);
  }
  </code></pre>
  
  <p>(It works without all python mess)
  I compile it through distutils and then, in terminal (using xubuntu), I put:</p>
  
  <pre class="lang-py prettyprint-override"><code>import paralelo
  while True:
      paralelo.paralelo(255)
  </code></pre>
  
  <p>And here, it goes out of python, it puts "markmb@..."</p>
  
  <p>Thanks in advance!</p>