Skip to content

Commit

Permalink
Add parentheses needed for python 3.9 (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesjer authored Apr 16, 2020
1 parent cc46cbd commit 1d4af32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/C/lapack.c
Original file line number Diff line number Diff line change
Expand Up @@ -6661,7 +6661,7 @@ extern int fselect_c(complex_t *w)
return -1;
}
#if PY_MAJOR_VERSION >= 3
if PyLong_Check(result) a = (int) PyLong_AsLong(result);
if (PyLong_Check(result)) a = (int) PyLong_AsLong(result);
#else
if PyInt_Check(result) a = (int) PyInt_AsLong(result);
#endif
Expand All @@ -6683,7 +6683,7 @@ extern int fselect_r(double *wr, double *wi)
return -1;
}
#if PY_MAJOR_VERSION >= 3
if PyLong_Check(result) a = (int) PyLong_AsLong(result);
if (PyLong_Check(result)) a = (int) PyLong_AsLong(result);
#else
if PyInt_Check(result) a = (int) PyInt_AsLong(result);
#endif
Expand Down Expand Up @@ -6883,7 +6883,7 @@ extern int fselect_gc(complex_t *w, double *v)
return -1;
}
#if PY_MAJOR_VERSION >= 3
if PyLong_Check(result) a = (int) PyLong_AsLong(result);
if (PyLong_Check(result)) a = (int) PyLong_AsLong(result);
#else
if PyInt_Check(result) a = (int) PyInt_AsLong(result);
#endif
Expand All @@ -6907,7 +6907,7 @@ extern int fselect_gr(double *wr, double *wi, double *v)
return -1;
}
#if PY_MAJOR_VERSION >= 3
if PyLong_Check(result) a = (int) PyLong_AsLong(result);
if (PyLong_Check(result)) a = (int) PyLong_AsLong(result);
#else
if PyInt_Check(result) a = (int) PyInt_AsLong(result);
#endif
Expand Down

0 comments on commit 1d4af32

Please sign in to comment.