[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-24 Thread Eli Bendersky
Eli Bendersky added the comment: Patch reviewed by Nick Coghlan and committed -- resolution: -> fixed status: open -> closed versions: +Python 2.7 -Python 3.2 ___ Python tracker __

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 44749e501982 by Eli Bendersky in branch '2.7': Issue #11634: Remove misleading paragraph from a comment http://hg.python.org/cpython/rev/44749e501982 -- ___ Python tracker

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset a729dfdbd24b by Eli Bendersky in branch 'default': Issue #11634: Remove misleading paragraph from a comment http://hg.python.org/cpython/rev/a729dfdbd24b -- nosy: +python-dev ___ Python tracker

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-22 Thread Eli Bendersky
Changes by Eli Bendersky : -- keywords: +patch Added file: http://bugs.python.org/file21354/issue11634.1.patch ___ Python tracker ___

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-22 Thread Eli Bendersky
Eli Bendersky added the comment: I propose the attached patch (for the latest default branch). It simply removes the first paragraph of that comment, since it's misleading and redundant. The *last* paragraph explains the same thing just in a clear and correct way (except that it also has a sm

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-22 Thread Eli Bendersky
Eli Bendersky added the comment: Yes it does, but the comment says something about "parameter 'size'" which is clearly absent from the function signature of PyBytes_FromString. -- ___ Python tracker _

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-22 Thread STINNER Victor
STINNER Victor added the comment: PyObject * PyBytes_FromString(const char *str) { register size_t size; ... size = strlen(str); ... } PyBytes_FromString() does compute the input string size using strlen(). -- ___ Python tracker

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-22 Thread Eli Bendersky
Eli Bendersky added the comment: Sure, I just wanted confirmation from another dev that it's indeed an error and I'm not missing anything. I suppose the fix is just replace "for both PyBytes_FromString() and PyBytes_FromStringAndSize()" with just "for PyBytes_FromStringAndSize()". I'll comm

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-22 Thread STINNER Victor
STINNER Victor added the comment: Could you write a patch to fix this comment? -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs

[issue11634] misleading comment on PyBytes_FromStringAndSize

2011-03-22 Thread Eli Bendersky
New submission from Eli Bendersky : 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 count