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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
3ef07fc9
Commit
3ef07fc9
authored
Jan 25, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix left-over tabs in source files
parent
4f4fc49c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
60 deletions
+25
-60
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+23
-58
pyximport/pyxbuild.py
pyximport/pyxbuild.py
+2
-2
No files found.
Cython/Compiler/Nodes.py
View file @
3ef07fc9
...
@@ -1097,7 +1097,7 @@ class FuncDefNode(StatNode, BlockNode):
...
@@ -1097,7 +1097,7 @@ class FuncDefNode(StatNode, BlockNode):
code
.
putln
(
""
)
code
.
putln
(
""
)
if
self
.
return_type
.
is_pyobject
:
if
self
.
return_type
.
is_pyobject
:
#if self.return_type.is_extension_type:
#if self.return_type.is_extension_type:
#
lhs = "(PyObject *)%s" % Naming.retval_cname
#
lhs = "(PyObject *)%s" % Naming.retval_cname
#else:
#else:
lhs
=
Naming
.
retval_cname
lhs
=
Naming
.
retval_cname
code
.
put_init_to_py_none
(
lhs
,
self
.
return_type
)
code
.
put_init_to_py_none
(
lhs
,
self
.
return_type
)
...
@@ -2775,9 +2775,9 @@ class AssignmentNode(StatNode):
...
@@ -2775,9 +2775,9 @@ class AssignmentNode(StatNode):
self
.
allocate_rhs_temps
(
env
)
self
.
allocate_rhs_temps
(
env
)
self
.
allocate_lhs_temps
(
env
)
self
.
allocate_lhs_temps
(
env
)
#
def analyse_expressions(self, env):
#
def analyse_expressions(self, env):
#
self.analyse_expressions_1(env)
#
self.analyse_expressions_1(env)
#
self.analyse_expressions_2(env)
#
self.analyse_expressions_2(env)
def
generate_execution_code
(
self
,
code
):
def
generate_execution_code
(
self
,
code
):
self
.
generate_rhs_evaluation_code
(
code
)
self
.
generate_rhs_evaluation_code
(
code
)
...
@@ -2877,21 +2877,8 @@ class SingleAssignmentNode(AssignmentNode):
...
@@ -2877,21 +2877,8 @@ class SingleAssignmentNode(AssignmentNode):
def
allocate_lhs_temps
(
self
,
env
):
def
allocate_lhs_temps
(
self
,
env
):
self
.
lhs
.
allocate_target_temps
(
env
,
self
.
rhs
)
self
.
lhs
.
allocate_target_temps
(
env
,
self
.
rhs
)
#self.lhs.release_target_temp(env)
#self.lhs.release_target_temp(env)
#self.rhs.release_temp(env)
#self.rhs.release_temp(env)
# def analyse_expressions_1(self, env, use_temp = 0):
# self.rhs.analyse_types(env)
# self.lhs.analyse_target_types(env)
# self.rhs = self.rhs.coerce_to(self.lhs.type, env)
# if use_temp:
# self.rhs = self.rhs.coerce_to_temp(env)
# self.rhs.allocate_temps(env)
#
# def analyse_expressions_2(self, env):
# self.lhs.allocate_target_temps(env)
# self.lhs.release_target_temp(env)
# self.rhs.release_temp(env)
def
generate_rhs_evaluation_code
(
self
,
code
):
def
generate_rhs_evaluation_code
(
self
,
code
):
self
.
rhs
.
generate_evaluation_code
(
code
)
self
.
rhs
.
generate_evaluation_code
(
code
)
...
@@ -2948,28 +2935,6 @@ class CascadedAssignmentNode(AssignmentNode):
...
@@ -2948,28 +2935,6 @@ class CascadedAssignmentNode(AssignmentNode):
#rhs.release_temp(env)
#rhs.release_temp(env)
self
.
rhs
.
release_temp
(
env
)
self
.
rhs
.
release_temp
(
env
)
# def analyse_expressions_1(self, env, use_temp = 0):
# self.rhs.analyse_types(env)
# if use_temp:
# self.rhs = self.rhs.coerce_to_temp(env)
# else:
# self.rhs = self.rhs.coerce_to_simple(env)
# self.rhs.allocate_temps(env)
#
# def analyse_expressions_2(self, env):
# from ExprNodes import CloneNode
# self.coerced_rhs_list = []
# for lhs in self.lhs_list:
# lhs.analyse_target_types(env)
# rhs = CloneNode(self.rhs)
# rhs = rhs.coerce_to(lhs.type, env)
# self.coerced_rhs_list.append(rhs)
# rhs.allocate_temps(env)
# lhs.allocate_target_temps(env)
# lhs.release_target_temp(env)
# rhs.release_temp(env)
# self.rhs.release_temp(env)
def
generate_rhs_evaluation_code
(
self
,
code
):
def
generate_rhs_evaluation_code
(
self
,
code
):
self
.
rhs
.
generate_evaluation_code
(
code
)
self
.
rhs
.
generate_evaluation_code
(
code
)
...
@@ -3329,8 +3294,8 @@ class BreakStatNode(StatNode):
...
@@ -3329,8 +3294,8 @@ class BreakStatNode(StatNode):
error
(
self
.
pos
,
"break statement not inside loop"
)
error
(
self
.
pos
,
"break statement not inside loop"
)
else
:
else
:
#code.putln(
#code.putln(
#
"goto %s;" %
#
"goto %s;" %
#
code.break_label)
#
code.break_label)
code
.
put_goto
(
code
.
break_label
)
code
.
put_goto
(
code
.
break_label
)
...
@@ -3414,8 +3379,8 @@ class ReturnStatNode(StatNode):
...
@@ -3414,8 +3379,8 @@ class ReturnStatNode(StatNode):
for
cname
,
type
in
code
.
funcstate
.
temps_holding_reference
():
for
cname
,
type
in
code
.
funcstate
.
temps_holding_reference
():
code
.
put_decref_clear
(
cname
,
type
)
code
.
put_decref_clear
(
cname
,
type
)
#code.putln(
#code.putln(
#
"goto %s;" %
#
"goto %s;" %
#
code.return_label)
#
code.return_label)
code
.
put_goto
(
code
.
return_label
)
code
.
put_goto
(
code
.
return_label
)
def
annotate
(
self
,
code
):
def
annotate
(
self
,
code
):
...
@@ -4367,7 +4332,7 @@ class TryFinallyStatNode(StatNode):
...
@@ -4367,7 +4332,7 @@ class TryFinallyStatNode(StatNode):
i
+
1
,
i
+
1
,
old_label
))
old_label
))
code
.
putln
(
code
.
putln
(
"}"
)
"}"
)
code
.
putln
(
code
.
putln
(
"}"
)
"}"
)
...
@@ -4547,18 +4512,18 @@ class FromCImportStatNode(StatNode):
...
@@ -4547,18 +4512,18 @@ class FromCImportStatNode(StatNode):
env
.
add_imported_entry
(
local_name
,
entry
,
pos
)
env
.
add_imported_entry
(
local_name
,
entry
,
pos
)
def
declaration_matches
(
self
,
entry
,
kind
):
def
declaration_matches
(
self
,
entry
,
kind
):
if
not
entry
.
is_type
:
if
not
entry
.
is_type
:
return
0
return
0
type
=
entry
.
type
type
=
entry
.
type
if
kind
==
'class'
:
if
kind
==
'class'
:
if
not
type
.
is_extension_type
:
if
not
type
.
is_extension_type
:
return
0
return
0
else
:
else
:
if
not
type
.
is_struct_or_union
:
if
not
type
.
is_struct_or_union
:
return
0
return
0
if
kind
<>
type
.
kind
:
if
kind
!=
type
.
kind
:
return
0
return
0
return
1
return
1
def
analyse_expressions
(
self
,
env
):
def
analyse_expressions
(
self
,
env
):
pass
pass
...
...
pyximport/pyxbuild.py
View file @
3ef07fc9
...
@@ -24,7 +24,7 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
...
@@ -24,7 +24,7 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
if
not
ext
:
if
not
ext
:
modname
,
extension
=
os
.
path
.
splitext
(
name
)
modname
,
extension
=
os
.
path
.
splitext
(
name
)
assert
extension
in
(
".pyx"
,
".py"
),
extension
assert
extension
in
(
".pyx"
,
".py"
),
extension
ext
=
Extension
(
name
=
modname
,
sources
=
[
filename
])
ext
=
Extension
(
name
=
modname
,
sources
=
[
filename
])
if
not
pyxbuild_dir
:
if
not
pyxbuild_dir
:
...
@@ -33,7 +33,7 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
...
@@ -33,7 +33,7 @@ def pyx_to_dll(filename, ext = None, force_rebuild = 0,
if
DEBUG
:
if
DEBUG
:
quiet
=
"--verbose"
quiet
=
"--verbose"
else
:
else
:
quiet
=
"--quiet"
quiet
=
"--quiet"
args
=
[
quiet
,
"build_ext"
]
args
=
[
quiet
,
"build_ext"
]
if
force_rebuild
:
if
force_rebuild
:
args
.
append
(
"--force"
)
args
.
append
(
"--force"
)
...
...
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