[issue33126] Some C buffer protocol APIs not documented

2018-03-28 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33126] Some C buffer protocol APIs not documented

2018-03-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 6124d8ec0d1eb8016e5e54a4d341b8f4f995623c by Antoine Pitrou (Miss Islington (bot)) in branch '3.7': bpo-33126: Document PyBuffer_ToContiguous() (GH-6292) (GH-6294)

[issue33126] Some C buffer protocol APIs not documented

2018-03-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 18fdc87207ea65b3906f07cb47c51a609e442f93 by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-33126: Document PyBuffer_ToContiguous() (GH-6292) (GH-6293)

[issue33126] Some C buffer protocol APIs not documented

2018-03-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +6018 ___ Python tracker ___

[issue33126] Some C buffer protocol APIs not documented

2018-03-28 Thread miss-islington
Change by miss-islington : -- pull_requests: +6017 ___ Python tracker ___

[issue33126] Some C buffer protocol APIs not documented

2018-03-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset aa50bf08e64f49d57917ab0b1aadf4308a3168a6 by Antoine Pitrou in branch 'master': bpo-33126: Document PyBuffer_ToContiguous() (#6292) https://github.com/python/cpython/commit/aa50bf08e64f49d57917ab0b1aadf4308a3168a6 --

[issue33126] Some C buffer protocol APIs not documented

2018-03-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, it seems only PyBuffer_ToContiguous() is worth documenting. -- ___ Python tracker ___

[issue33126] Some C buffer protocol APIs not documented

2018-03-28 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +6016 stage: needs patch -> patch review ___ Python tracker ___

[issue33126] Some C buffer protocol APIs not documented

2018-03-25 Thread Stefan Krah
Stefan Krah added the comment: And if view->len > len in PyBuffer_FromContiguous(), then view will contain uninitialized bytes, which is bad. -- ___ Python tracker

[issue33126] Some C buffer protocol APIs not documented

2018-03-25 Thread Stefan Krah
Stefan Krah added the comment: Yes, the signatures are weird. In PyBuffer_FromContiguous(), "len" is the size of "buf" in bytes. If "buf" contains 6 floats, but "view" only has space for 4, then only 4 are copied into "view". To avoid that sort of thing, I changed

[issue33126] Some C buffer protocol APIs not documented

2018-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks. The PyBuffer_ToContiguous() API is weird: why pass `len` if it cannot be anything other than `src->len`? Also, it would be nice to explain whether the actual buffer data is copied around (with a memory allocation?) or if it's just the

[issue33126] Some C buffer protocol APIs not documented

2018-03-24 Thread Stefan Krah
Stefan Krah added the comment: I fixed PyBuffer_ToContiguous() in 3.3, PyBuffer_FromContiguous() was broken until #23370. For a start, here's a doc patch for PyBuffer_ToContiguous(). PyBuffer_FromContiguous() does the opposite and loads a contiguous buffer into a

[issue33126] Some C buffer protocol APIs not documented

2018-03-23 Thread Antoine Pitrou
New submission from Antoine Pitrou : The following C functions are available for C code but not documented: - PyBuffer_ToContiguous() - PyBuffer_FromContiguous() - PyObject_CopyData() I am not sure how to describe those functions myself. -- assignee: docs@python