On 14.06.2005, at 18:58, harold fellermann wrote:

> Am I stupid or what?

Yes I was ...

> // PhysicsDPD instance structure
> typedef struct {
>    PyObject_HEAD
>    double cutoff;
>    double friction;
>    double noise;
>    double dt;
> } hyper_PhysicsDPD;
>
>
> //--------------------------------------------------------------------
> // tp_init
> //--------------------------------------------------------------------
> static int
> hyper_PhysicsDPD_init(hyper_PhysicsDPD *self, PyObject *args, PyObject
> *kwds)
> {
>    if (!PyArg_ParseTuple(args,"ffff",
>                       &self->cutoff,
>                       &self->friction,
>                       &self->noise,
>                       &self->dt
>                       ))
>      return -1;
>
>    printf("%f %f %f
> %f\n",self->cutoff,self->friction,self->noise,self->dt);
>
>    return 1;
> }

format string must be "dddd" - as the members are defined as doubles,
not floats. Sorry to bother you.

- harold -

--
A country without army is like a fish without bicycle.
--

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to