Public bug reported:

gcc and g++ interprets pyport.h in different way.

```
(system) inada-n@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@oldbench:~$ gcc longbits.c -I /usr/include/python2.7/
(system) inada-n@oldbench:~$ ./a.out 
digit bits = 30
sizeof(digit) = 4
(system) inada-n@oldbench:~$ g++ longbits.c -I /usr/include/python2.7/
(system) inada-n@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

** Affects: python2.7 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1545899

Title:
  PYLONG_BITS_IN_DIGIT is misconfigured on g++

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1545899/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to