Skip to content

Commit

Permalink
Trac #32101: ubuntu-trusty: Fix eclib build failure
Browse files Browse the repository at this point in the history
(from https://trac.sagemath.org/ticket/31443#comment:124)

URL: https://trac.sagemath.org/32101
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Jul 17, 2021
2 parents d439c06 + d1c6ace commit 3dadb86
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions build/pkgs/eclib/patches/points_const.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Patch by John Cremona in https://trac.sagemath.org/ticket/31443#comment:126


diff --git a/libsrc/points.cc b/libsrc/points.cc
index 1c612f4..714b73d 100644
--- a/libsrc/points.cc
+++ b/libsrc/points.cc
@@ -305,8 +305,9 @@ vector<Point> points_from_x(Curvedata &E, const bigrational& x)
// (4) y-coordinate

struct Point_comparer {
- bool operator()(Point& P, Point& Q)
+ bool operator()(const Point& P0, const Point& Q0)
{
+ Point P(P0), Q(Q0); // take copies as args must be const but order() requires non-const
int s = order(P)-order(Q);
if(s) return (s<0); // true if P has smaller order
bigint t = P.getZ()-Q.getZ();
}}}

0 comments on commit 3dadb86

Please sign in to comment.