Opened 6 years ago

Closed 6 years ago

#22291 closed enhancement (fixed)

ob_size does not exist in Python 3

Reported by: Jeroen Demeyer Owned by:
Priority: major Milestone: sage-7.6
Component: python3 Keywords:
Cc: Luca De Feo, Vincent Delecroix, Frédéric Chapoton Merged in:
Authors: Jeroen Demeyer Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: b5f74b1 (Commits, GitHub, GitLab) Commit: b5f74b1a88203cbc1768e47a2ae2037a1b6f18d6
Dependencies: Stopgaps:

Status badges

Description (last modified by Jeroen Demeyer)

Replace direct access of the ob_size member of a PyObject* by the macro Py_SIZE(). Also use Cython's longintrepr.pxd instead of manually including longintrepr.h.

This is used in

  • src/sage/libs/cypari2/convert.pyx
  • src/sage/libs/gmp/pylong.pyx

Change History (7)

comment:1 Changed 6 years ago by Jeroen Demeyer

Description: modified (diff)

comment:2 Changed 6 years ago by Jeroen Demeyer

Description: modified (diff)

comment:3 Changed 6 years ago by Jeroen Demeyer

Branch: u/jdemeyer/ob_size_does_not_exist_in_python_3

comment:4 Changed 6 years ago by Jeroen Demeyer

Commit: b5f74b1a88203cbc1768e47a2ae2037a1b6f18d6
Status: newneeds_review

New commits:

b5f74b1Use longintrepr.pxd from Cython

comment:5 Changed 6 years ago by Frédéric Chapoton

Status: needs_reviewpositive_review

ok, lgtm and bot is green

comment:6 Changed 6 years ago by Jeroen Demeyer

Reviewers: Frédéric Chapoton

comment:7 Changed 6 years ago by Volker Braun

Branch: u/jdemeyer/ob_size_does_not_exist_in_python_3b5f74b1a88203cbc1768e47a2ae2037a1b6f18d6
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.