Severe c-module problem

Michael Hudson mwh at python.net
Fri Apr 4 13:06:37 CEST 2003


Rolf Wester <wester at ilt.fhg.de> writes:

> Hi,
> 
> I have a c-Module "pyopt" with a function:
> 
> static PyObject *_wrap_c_nlo_init_Hs(PyObject *self, PyObject *args) {
>      PyObject *resultobj;
>      char * arg0;
> 
>      cout << "in init_Hs" << endl;
> 
>      if(!PyArg_ParseTuple(args,(char *)"ss:c_nlo_init_Hs", &arg0))
                                          ^^                 ^^^^^
                                  specifies two arguments      |
                                                               |
                                         you only pass a pointer for one

>              return NULL;
> 
>      cout << "in init_Hs: " << arg0 << endl;
> 
>      c_nlo_init_Hs(arg0);
>      Py_INCREF(Py_None);
>      resultobj = Py_None;
>      return resultobj;
> }
> 

HTH,
M.

-- 
  Sufficiently advanced political correctness is indistinguishable
  from irony.                                           -- Erik Naggum




More information about the Python-list mailing list