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
Boxiang Sun
cython
Commits
532bb1ff
Commit
532bb1ff
authored
May 11, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove useless code from fused types dispatch
parent
a9e6033a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
19 deletions
+1
-19
Cython/Compiler/FusedNode.py
Cython/Compiler/FusedNode.py
+1
-19
No files found.
Cython/Compiler/FusedNode.py
View file @
532bb1ff
...
@@ -238,19 +238,11 @@ class FusedCFuncDefNode(StatListNode):
...
@@ -238,19 +238,11 @@ class FusedCFuncDefNode(StatListNode):
for
specialized_type
in
normal_types
:
for
specialized_type
in
normal_types
:
# all_numeric = all_numeric and specialized_type.is_numeric
# all_numeric = all_numeric and specialized_type.is_numeric
py_type_name
=
specialized_type
.
py_type_name
()
py_type_name
=
specialized_type
.
py_type_name
()
# in the case of long, unicode or bytes we need to instance
# check for long_, unicode_, bytes_ (long = long is no longer
# valid code with control flow analysis)
specialized_check_name
=
py_type_name
if
py_type_name
in
(
'long'
,
'unicode'
,
'bytes'
):
specialized_check_name
+=
'_'
specialized_type_name
=
specialized_type
.
specialization_string
specialized_type_name
=
specialized_type
.
specialization_string
pyx_code
.
context
.
update
(
locals
())
pyx_code
.
context
.
update
(
locals
())
pyx_code
.
put_chunk
(
pyx_code
.
put_chunk
(
u"""
u"""
{{if_}} isinstance(arg, {{
specialized_check
_name}}):
{{if_}} isinstance(arg, {{
py_type
_name}}):
dest_sig[{{dest_sig_idx}}] = '{{specialized_type_name}}'
dest_sig[{{dest_sig_idx}}] = '{{specialized_type_name}}'
"""
)
"""
)
if_
=
'elif'
if_
=
'elif'
...
@@ -539,16 +531,6 @@ class FusedCFuncDefNode(StatListNode):
...
@@ -539,16 +531,6 @@ class FusedCFuncDefNode(StatListNode):
pyx_code
.
put_chunk
(
pyx_code
.
put_chunk
(
u"""
u"""
def __pyx_fused_cpdef(signatures, args, kwargs, defaults):
def __pyx_fused_cpdef(signatures, args, kwargs, defaults):
import sys
if sys.version_info >= (3, 0):
long_ = int
unicode_ = str
bytes_ = bytes
else:
long_ = long
unicode_ = unicode
bytes_ = str
dest_sig = [None] * {{n_fused}}
dest_sig = [None] * {{n_fused}}
if kwargs is None:
if kwargs is None:
...
...
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