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
8cd71f08
Commit
8cd71f08
authored
Jul 07, 2010
by
Craig Citro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various cosmetic touch-ups.
parent
d817949d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-5
Cython/Compiler/Optimize.py
Cython/Compiler/Optimize.py
+3
-2
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+1
-1
Cython/Compiler/TypeInference.py
Cython/Compiler/TypeInference.py
+2
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
8cd71f08
...
...
@@ -5337,13 +5337,12 @@ class PowNode(NumBinopNode):
self
.
operand2
.
result
())
# Note: This class is temporar
y "shut down" into an ineffective mod
e temp
# Note: This class is temporar
ily "shut down" into an ineffectiv
e temp
# allocation mode.
#
# More sophisticated temp reuse was going on before,
# one could have a look at adding this again after /all/ classes
# are converted to the new temp scheme. (The temp juggling cannot work
# otherwise).
# More sophisticated temp reuse was going on before, one could have a
# look at adding this again after /all/ classes are converted to the
# new temp scheme. (The temp juggling cannot work otherwise).
class
BoolBinopNode
(
ExprNode
):
# Short-circuiting boolean operation.
#
...
...
Cython/Compiler/Optimize.py
View file @
8cd71f08
...
...
@@ -1444,6 +1444,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
elif
len
(
pos_args
)
!=
1
:
self
.
_error_wrong_arg_count
(
'bool'
,
node
,
pos_args
,
'0 or 1'
)
return
node
else
:
return
pos_args
[
0
].
coerce_to_boolean
(
self
.
current_env
()).
coerce_to_pyobject
(
self
.
current_env
())
...
...
Cython/Compiler/PyrexTypes.py
View file @
8cd71f08
...
...
@@ -2426,7 +2426,7 @@ def independent_spanning_type(type1, type2):
elif
(
type1
is
c_bint_type
or
type2
is
c_bint_type
)
and
(
type1
.
is_numeric
and
type2
.
is_numeric
):
# special case: if one of the results is a bint and the other
# is another C integer, we must prevent returning a numeric
# type so that we do not lo
o
se the ability to coerce to a
# type so that we do not lose the ability to coerce to a
# Python bool if we have to.
return
py_object_type
span_type
=
_spanning_type
(
type1
,
type2
)
...
...
Cython/Compiler/TypeInference.py
View file @
8cd71f08
...
...
@@ -296,7 +296,8 @@ def find_spanning_type(type1, type2):
return
py_object_type
else
:
result_type
=
PyrexTypes
.
spanning_type
(
type1
,
type2
)
if
result_type
in
(
PyrexTypes
.
c_double_type
,
PyrexTypes
.
c_float_type
,
Builtin
.
float_type
):
if
result_type
in
(
PyrexTypes
.
c_double_type
,
PyrexTypes
.
c_float_type
,
Builtin
.
float_type
):
# Python's float type is just a C double, so it's safe to
# use the C type instead
return
PyrexTypes
.
c_double_type
...
...
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