[Bug 1545899] Re: PYLONG_BITS_IN_DIGIT is misconfigured on g++
Matthias Klose
doko at ubuntu.com
Sun Apr 17 14:37:15 UTC 2016
according to the upstream issue this is fixed since 2012.
** Bug watch added: Python Roundup #10052
http://bugs.python.org/issue10052
** Also affects: python via
http://bugs.python.org/issue10052
Importance: Unknown
Status: Unknown
** Changed in: python2.7 (Ubuntu)
Status: New => Triaged
** Changed in: python2.7 (Ubuntu)
Status: Triaged => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python2.7 in Ubuntu.
https://bugs.launchpad.net/bugs/1545899
Title:
PYLONG_BITS_IN_DIGIT is misconfigured on g++
Status in Python:
Unknown
Status in python2.7 package in Ubuntu:
Fix Released
Bug description:
gcc and g++ interprets pyport.h in different way.
```
(system) inada-n at oldbench:~$ cat longbits.c
#include <Python.h>
#include <longintrepr.h>
int main() {
printf("digit bits = %d\n", PYLONG_BITS_IN_DIGIT);
printf("sizeof(digit) = %lu\n", sizeof(digit));
}
(system) inada-n at oldbench:~$ gcc longbits.c -I /usr/include/python2.7/
(system) inada-n at oldbench:~$ ./a.out
digit bits = 30
sizeof(digit) = 4
(system) inada-n at oldbench:~$ g++ longbits.c -I /usr/include/python2.7/
(system) inada-n at oldbench:~$ ./a.out
digit bits = 15
sizeof(digit) = 2
```
This breaks some extension modules. For example, see
https://github.com/msgpack/msgpack-python/issues/169
Please backport this bugfix.
https://github.com/python/cpython/commit/050ba5ec1e941e05607ef29049bde08798387bcc
To manage notifications about this bug go to:
https://bugs.launchpad.net/python/+bug/1545899/+subscriptions
More information about the foundations-bugs
mailing list