Skip to content

Commit

Permalink
add missing semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
culler committed Sep 6, 2023
1 parent 5239bbf commit 90f856b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cypari/convert.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cdef extern from "pylong_support.h":
digit* OB_DIGIT(py_long o)
void _PyLong_SetSignAndDigitCount(py_long o, int sign, Py_ssize_t size)
Py_ssize_t _PyLong_DigitCount(py_long op)
Py_ssize_t _PyLong_Sign(py_long op)
Py_ssize_t _PyLong_Sign(object op)
cdef int LONG_MAX, LONG_MIN

####################################
Expand Down Expand Up @@ -267,7 +267,7 @@ cdef GEN PyLong_AsGEN(py_long x):
cdef pari_longword sgn

sizedigits = _PyLong_DigitCount(x)
sign = _PyLong_Sign(x)
sign = _PyLong_Sign(<object>x)
if sign == 0:
return gen_0
sgn = evalsigne(sign)
Expand Down
6 changes: 3 additions & 3 deletions cypari/pylong_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ inline Py_ssize_t
_PyLong_DigitCount(PyLongObject *op)
{
assert(PyLong_Check(op));
return abs(Py_SIZE(op));
return labs(Py_SIZE(op));
}
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
int LONG_MAX = 2147483647
int LONG_MIN = -2147483648
int LONG_MAX = 2147483647;
int LONG_MIN = -2147483648;
#else
#include <limits.h>
#endif
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ def run(self):

link_args = []
if sys.platform == 'darwin':
compile_args=['-mmacosx-version-min=10.9']
compile_args=['-mmacosx-version-min=10.9', '-Wno-unreachable-code',
'-Wno-unreachable-code-fallthrough']
else:
compile_args = []
if ext_compiler == 'mingw32':
Expand Down

0 comments on commit 90f856b

Please sign in to comment.