This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年06月13日 20:37 by vstinner, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| reject_discontigious.patch | vstinner, 2010年06月14日 22:14 | |||
| Messages (3) | |||
|---|---|---|---|
| msg107749 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年06月13日 20:37 | |
getbuffer() checks that the buffer is contiguous. "s#", "y", "z" formats use convertbuffer() which doesn't check that the buffer is contigious, as "w" and "w#" formats which call directly PyObject_GetBuffer() which extra check. I don't think that the functions using these format support discontiguous buffers. I cannot check because I don't know how to create such buffer. It would be safer to reject discontigious buffer. If a function would like to support discontigious buffer, it should use "O" format, call PyObject_GetBuffer() with the right option and do its own checks on the buffer object. |
|||
| msg107820 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年06月14日 22:14 | |
Write a patch. test_getargs2.py has now tests for many byte and unicode formats and so it can validate the patch. |
|||
| msg111753 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2010年07月28日 00:41 | |
Commited to 3.2 (r83197). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:02 | admin | set | github: 53237 |
| 2010年07月28日 00:41:41 | vstinner | set | status: open -> closed resolution: fixed messages: + msg111753 |
| 2010年06月14日 22:14:56 | vstinner | set | files:
+ reject_discontigious.patch keywords: + patch messages: + msg107820 |
| 2010年06月13日 20:37:35 | vstinner | create | |