Skip to content

Commit 234a6d5

Browse files
authored
Merge pull request #87 from antonio-rojas/flint-3.3
Fix crashes with flint 3.3
2 parents 5f4e598 + a31d8ae commit 234a6d5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

libsrc/eclib/flinterface.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,22 @@ typedef struct
5858
hlimb_t * entries;
5959
slong r;
6060
slong c;
61+
#if (__FLINT_VERSION==3)&&(__FLINT_VERSION_MINOR<3)
6162
hlimb_t ** rows;
63+
#else
64+
slong stride;
65+
#endif
6266
nmod_t mod;
6367
}
6468
hmod_mat_struct;
6569

6670
typedef hmod_mat_struct hmod_mat_t[1];
6771

72+
#if (__FLINT_VERSION==3)&&(__FLINT_VERSION_MINOR<3)
6873
#define hmod_mat_entry(mat,i,j) ((mat)->rows[(i)][(j)])
74+
#else
75+
#define hmod_mat_entry nmod_mat_entry
76+
#endif
6977
#define hmod_mat_nrows(mat) ((mat)->r)
7078
#define hmod_mat_ncols(mat) ((mat)->c)
7179

libsrc/mat.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,7 +1602,9 @@ hmod_mat_clear(hmod_mat_t mat)
16021602
if (mat->entries)
16031603
{
16041604
flint_free(mat->entries);
1605+
#if (__FLINT_VERSION==3)&&(__FLINT_VERSION_MINOR<3)
16051606
flint_free(mat->rows);
1607+
#endif
16061608
}
16071609
}
16081610

0 commit comments

Comments
 (0)