Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
8b70a851
Commit
8b70a851
authored
Sep 22, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always use _abs64() for "long long" on Windows, not only on 64bit.
parent
20ce989a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Cython/Utility/Builtins.c
Cython/Utility/Builtins.c
+1
-1
Cython/Utility/TypeConversion.c
Cython/Utility/TypeConversion.c
+2
-2
No files found.
Cython/Utility/Builtins.c
View file @
8b70a851
...
...
@@ -238,7 +238,7 @@ static CYTHON_INLINE PY_LONG_LONG __Pyx_abs_longlong(PY_LONG_LONG x) {
return
(
unsigned
PY_LONG_LONG
)
std
::
abs
(
x
);
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
return
(
unsigned
PY_LONG_LONG
)
llabs
(
x
);
#elif defined (_MSC_VER)
&& defined (_M_X64)
#elif defined (_MSC_VER)
// abs() is defined for long, but 64-bits type on MSVC is long long.
// Use MS-specific _abs64 instead.
return
(
unsigned
PY_LONG_LONG
)
_abs64
(
x
);
...
...
Cython/Utility/TypeConversion.c
View file @
8b70a851
...
...
@@ -24,10 +24,10 @@
#define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
&& defined (_M_X64)
#elif defined (_MSC_VER)
// abs() is defined for long, but 64-bits type on MSVC is long long.
// Use MS-specific _abs64 instead.
#define __Pyx_sst_abs(value)
_abs64(value
)
#define __Pyx_sst_abs(value)
((Py_ssize_t)_abs64(value)
)
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment