[Bug 1545899] Re: PYLONG_BITS_IN_DIGIT is misconfigured on g++

Bug Watch Updater 1545899 at bugs.launchpad.net
Sun Apr 17 15:25:26 UTC 2016


** Changed in: python
       Status: Unknown => 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:
  Fix Released
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