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
Kirill Smelkov
cython
Commits
9b42c5a1
Commit
9b42c5a1
authored
May 17, 2016
by
Robert Bradshaw
Committed by
Stefan Behnel
Jul 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around missing Cygwin truncl.
parent
31a4969f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
Cython/Compiler/Optimize.py
Cython/Compiler/Optimize.py
+6
-1
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+6
-0
No files found.
Cython/Compiler/Optimize.py
View file @
9b42c5a1
...
...
@@ -2085,8 +2085,13 @@ class OptimizeBuiltinCalls(Visitor.NodeRefCleanupMixin,
elif
node
.
type
.
assignable_from
(
func_arg
.
type
)
or
func_arg
.
type
.
is_float
:
return
ExprNodes
.
TypecastNode
(
node
.
pos
,
operand
=
func_arg
,
type
=
node
.
type
)
elif
func_arg
.
type
.
is_float
and
node
.
type
.
is_numeric
:
if
func_arg
.
type
.
math_h_modifier
==
'l'
:
# Work around missing Cygwin definition.
truncl
=
'__Pyx_truncl'
else
:
truncl
=
'trunc'
+
func_arg
.
type
.
math_h_modifier
return
ExprNodes
.
PythonCapiCallNode
(
node
.
pos
,
'trunc'
+
func_arg
.
type
.
math_h_modifier
,
node
.
pos
,
truncl
,
func_type
=
self
.
float_float_func_types
[
func_arg
.
type
],
args
=
[
func_arg
],
py_name
=
'int'
,
...
...
Cython/Utility/ModuleSetupCode.c
View file @
9b42c5a1
...
...
@@ -311,6 +311,12 @@ static CYTHON_INLINE float __PYX_NAN() {
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif
/////////////// UtilityFunctionPredeclarations.proto ///////////////
...
...
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