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
2a3d3d3e
Commit
2a3d3d3e
authored
Jul 13, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix type issues with super().
parent
a5c394cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+9
-18
No files found.
Cython/Compiler/Nodes.py
View file @
2a3d3d3e
...
@@ -2286,22 +2286,6 @@ class CFuncDefNode(FuncDefNode):
...
@@ -2286,22 +2286,6 @@ class CFuncDefNode(FuncDefNode):
error
(
pos
,
"Function declared public or api may not have "
error
(
pos
,
"Function declared public or api may not have "
"private types"
)
"private types"
)
def
call_self_node
(
self
,
omit_optional_args
=
0
,
is_module_scope
=
0
):
# OLD - DELETE
from
.
import
ExprNodes
args
=
self
.
type
.
args
if
omit_optional_args
:
args
=
args
[:
len
(
args
)
-
self
.
type
.
optional_arg_count
]
arg_names
=
[
arg
.
name
for
arg
in
args
]
if
is_module_scope
:
cfunc
=
ExprNodes
.
NameNode
(
self
.
pos
,
name
=
self
.
entry
.
name
)
else
:
self_arg
=
ExprNodes
.
NameNode
(
self
.
pos
,
name
=
arg_names
[
0
])
cfunc
=
ExprNodes
.
AttributeNode
(
self
.
pos
,
obj
=
self_arg
,
attribute
=
self
.
entry
.
name
)
skip_dispatch
=
not
is_module_scope
or
Options
.
lookup_module_cpdef
c_call
=
ExprNodes
.
SimpleCallNode
(
self
.
pos
,
function
=
cfunc
,
args
=
[
ExprNodes
.
NameNode
(
self
.
pos
,
name
=
n
)
for
n
in
arg_names
[
1
-
is_module_scope
:]],
wrapper_call
=
skip_dispatch
)
return
ReturnStatNode
(
pos
=
self
.
pos
,
return_type
=
PyrexTypes
.
py_object_type
,
value
=
c_call
)
def
call_self_node
(
self
,
omit_optional_args
=
0
,
is_module_scope
=
0
):
def
call_self_node
(
self
,
omit_optional_args
=
0
,
is_module_scope
=
0
):
from
.
import
ExprNodes
from
.
import
ExprNodes
args
=
self
.
type
.
args
args
=
self
.
type
.
args
...
@@ -2311,9 +2295,16 @@ class CFuncDefNode(FuncDefNode):
...
@@ -2311,9 +2295,16 @@ class CFuncDefNode(FuncDefNode):
# The @cname decorator may mutate this later.
# The @cname decorator may mutate this later.
func_cname
=
LazyStr
(
lambda
:
self
.
entry
.
func_cname
)
func_cname
=
LazyStr
(
lambda
:
self
.
entry
.
func_cname
)
cfunc
=
ExprNodes
.
PythonCapiFunctionNode
(
self
.
pos
,
self
.
entry
.
name
,
func_cname
,
self
.
type
)
cfunc
=
ExprNodes
.
PythonCapiFunctionNode
(
self
.
pos
,
self
.
entry
.
name
,
func_cname
,
self
.
type
)
cfunc
.
entry
=
self
.
entry
# The entry is inspected due to self.type.is_overridable, but it
# has the wrong self type.
cfunc
.
entry
=
copy
.
copy
(
self
.
entry
)
cfunc
.
entry
.
type
=
self
.
type
skip_dispatch
=
not
is_module_scope
or
Options
.
lookup_module_cpdef
skip_dispatch
=
not
is_module_scope
or
Options
.
lookup_module_cpdef
c_call
=
ExprNodes
.
SimpleCallNode
(
self
.
pos
,
function
=
cfunc
,
args
=
[
ExprNodes
.
NameNode
(
self
.
pos
,
name
=
n
)
for
n
in
arg_names
],
wrapper_call
=
skip_dispatch
)
c_call
=
ExprNodes
.
SimpleCallNode
(
self
.
pos
,
function
=
cfunc
,
args
=
[
ExprNodes
.
NameNode
(
self
.
pos
,
name
=
n
)
for
n
in
arg_names
],
wrapper_call
=
skip_dispatch
)
return
ReturnStatNode
(
pos
=
self
.
pos
,
return_type
=
PyrexTypes
.
py_object_type
,
value
=
c_call
)
return
ReturnStatNode
(
pos
=
self
.
pos
,
return_type
=
PyrexTypes
.
py_object_type
,
value
=
c_call
)
def
declare_arguments
(
self
,
env
):
def
declare_arguments
(
self
,
env
):
...
...
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