[New-bugs-announce] [issue11634] misleading comment on PyBytes_FromStringAndSize

Eli Bendersky report at bugs.python.org
Tue Mar 22 15:41:22 CET 2011


New submission from Eli Bendersky <eliben at gmail.com>:

The comment string above the implementation of _PyBytes_FromStringAndSize in Objects/bytesobject.c starts with:

  /*
  For both PyBytes_FromString() and PyBytes_FromStringAndSize(), the
  parameter `size' denotes number of characters to allocate, not 
  counting   any null terminating character.

This is misleading since PyBytes_FromString() has no 'size' parameter. 

The problem also exists for PyString in Python 2.x

----------
assignee: docs at python
components: Documentation
keywords: easy
messages: 131750
nosy: docs at python, eli.bendersky
priority: low
severity: normal
status: open
title: misleading comment on PyBytes_FromStringAndSize
versions: Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11634>
_______________________________________


More information about the New-bugs-announce mailing list