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
52679b28
Commit
52679b28
authored
Dec 04, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
infer builtin/extension types from type constructors
parent
e6842141
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+7
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
52679b28
...
@@ -1072,8 +1072,8 @@ class NameNode(AtomicExprNode):
...
@@ -1072,8 +1072,8 @@ class NameNode(AtomicExprNode):
elif
(
self
.
entry
.
type
.
is_extension_type
or
self
.
entry
.
type
.
is_builtin_type
)
and
\
elif
(
self
.
entry
.
type
.
is_extension_type
or
self
.
entry
.
type
.
is_builtin_type
)
and
\
self
.
name
==
self
.
entry
.
type
.
name
:
self
.
name
==
self
.
entry
.
type
.
name
:
# Unfortunately the type attribute of type objects
# Unfortunately the type attribute of type objects
# is used for the pointer to the type the represent.
# is used for the pointer to the type the
y
represent.
return
type_type
return
self
.
entry
.
type
#
type_type
else
:
else
:
return
self
.
entry
.
type
return
self
.
entry
.
type
...
@@ -2396,6 +2396,11 @@ class SimpleCallNode(CallNode):
...
@@ -2396,6 +2396,11 @@ class SimpleCallNode(CallNode):
func_type
=
func_type
.
base_type
func_type
=
func_type
.
base_type
if
func_type
.
is_cfunction
:
if
func_type
.
is_cfunction
:
return
func_type
.
return_type
return
func_type
.
return_type
elif
func_type
.
is_extension_type
:
return
func_type
elif
func_type
.
is_builtin_type
and
\
func_type
.
name
in
Builtin
.
types_that_construct_their_instance
:
return
func_type
else
:
else
:
return
py_object_type
return
py_object_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