[Python-checkins] r55814 - python/branches/cpy_merge/Modules/_bytes_iomodule.c python/branches/cpy_merge/Modules/_string_iomodule.c

Neal Norwitz nnorwitz at gmail.com
Fri Jun 8 00:27:40 CEST 2007


On 6/7/07, alexandre.vassalotti <python-checkins at python.org> wrote:
> Author: alexandre.vassalotti
> Date: Thu Jun  7 23:51:21 2007
> New Revision: 55814
>
> Modified:
>    python/branches/cpy_merge/Modules/_bytes_iomodule.c
>    python/branches/cpy_merge/Modules/_string_iomodule.c
> Log:
> Update to reflect the new IO API.
>
>
> Modified: python/branches/cpy_merge/Modules/_string_iomodule.c
> ==============================================================================
> --- python/branches/cpy_merge/Modules/_string_iomodule.c        (original)
> +++ python/branches/cpy_merge/Modules/_string_iomodule.c        Thu Jun  7 23:51:21 2007
>  static PyObject *
>  string_io_flush(StringIOObject *self)
>  {
> @@ -326,7 +333,7 @@
>      while (--position >= self->string_size)
>          self->buf[position] = 0;
>
> -    Py_RETURN_NONE;
> +    return Py_BuildValue("n", self->pos);
>  }

These cases would be better as:

  return PyInt_FromSsize_t(self->pos);

(or something similar.)

n


More information about the Python-checkins mailing list