[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18913 pull_request: https://github.com/python/cpython/pull/19573 ___ Python tracker ___

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-17 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18912 pull_request: https://github.com/python/cpython/pull/19572 ___ Python tracker ___

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1ae035b7e847064d09df01ca62b8a761e9b5aae3 by Victor Stinner in branch 'master': bpo-40302: Add pycore_byteswap.h header file (GH-19552) https://github.com/python/cpython/commit/1ae035b7e847064d09df01ca62b8a761e9b5aae3 --

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread STINNER Victor
STINNER Victor added the comment: We have another function which may be grouped somehow in the same category: _Py_bit_length(). -- ___ Python tracker ___

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Isn't pyport.h a public header? IMHO you should put in a private header and make it an inline function there. Here is for example what we do in Arrow: https://github.com/apache/arrow/blob/master/cpp/src/arrow/util/bit_util.h#L48 -- nosy: +pitrou

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread STINNER Victor
New submission from STINNER Victor : There are multiple files which have to swap bytes. I propose to add functions for that: * _Py_bswap16(): uint16_t * _Py_bswap32(): uint32_t * _Py_bswap64(): uint64_t -- components: Interpreter Core messages: 366600 nosy: vstinner priority: normal

[issue40302] Add _Py_bswap32() function to pyport.h

2020-04-16 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +18899 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19552 ___ Python tracker ___