[Python-checkins] r55542 - python/branches/cpy_merge/Modules/cStringIO.c

Alexandre Vassalotti alexandre at peadrop.com
Thu May 24 02:31:59 CEST 2007


> Author: alexandre.vassalotti
> Date: Thu May 24 02:20:45 2007
> New Revision: 55542
>
> Modified:
>    python/branches/cpy_merge/Modules/cStringIO.c
> Log:
> Fix a small build error due to the docstring move. (oops)
>
>

Not again... I checked in a change to IO_getval by mistake, which was
supposed to go in my next commit. I guess I will need to be more
careful now.

> Modified: python/branches/cpy_merge/Modules/cStringIO.c
> ==============================================================================
> --- python/branches/cpy_merge/Modules/cStringIO.c       (original)
> +++ python/branches/cpy_merge/Modules/cStringIO.c       Thu May 24 02:20:45 2007
> @@ -124,24 +124,9 @@
>  static PyObject *
>  IO_getval(IOobject *self, PyObject *args)
>  {
> -       PyObject *use_pos = Py_None;
> -       Py_ssize_t s;
> -
>         if (!IO__opencheck(self))
>                 return NULL;
> -       if (!PyArg_UnpackTuple(args, "getval", 0, 1, &use_pos))
> -               return NULL;
> -
> -       if (PyObject_IsTrue(use_pos)) {
> -               s = self->pos;
> -               if (s > self->string_size)
> -                       s = self->string_size;
> -       }
> -       else {
> -               s = self->string_size;
> -       }
> -
> -       return PyString_FromStringAndSize(self->buf, s);
> +       return PyString_FromStringAndSize(self->buf, self->string_size);
>  }

-- Alexandre


More information about the Python-checkins mailing list