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
c5b12aac
Commit
c5b12aac
authored
Feb 02, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New message(...) distinct from warn(...)
parent
a704e200
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
Cython/Compiler/Errors.py
Cython/Compiler/Errors.py
+11
-0
Cython/Compiler/TypeInference.py
Cython/Compiler/TypeInference.py
+3
-3
No files found.
Cython/Compiler/Errors.py
View file @
c5b12aac
...
...
@@ -139,6 +139,17 @@ def error(position, message):
LEVEL
=
1
# warn about all errors level 1 or higher
def
message
(
position
,
message
,
level
=
1
):
if
level
<
LEVEL
:
return
warn
=
CompileWarning
(
position
,
message
)
line
=
"note: %s
\
n
"
%
warn
if
listing_file
:
listing_file
.
write
(
line
)
if
echo_file
:
echo_file
.
write
(
line
)
return
warn
def
warning
(
position
,
message
,
level
=
0
):
if
level
<
LEVEL
:
return
...
...
Cython/Compiler/TypeInference.py
View file @
c5b12aac
from
Errors
import
error
,
warning
,
warn_once
,
InternalError
from
Errors
import
error
,
warning
,
message
,
warn_once
,
InternalError
import
ExprNodes
import
Nodes
import
Builtin
...
...
@@ -181,7 +181,7 @@ class SimpleAssignmentTypeInferer:
# print "No assignments", entry.pos, entry
entry
.
type
=
py_object_type
if
verbose
:
warning
(
entry
.
pos
,
"inferred '%s' to be of type '%s'"
%
(
entry
.
name
,
entry
.
type
),
1
)
message
(
entry
.
pos
,
"inferred '%s' to be of type '%s'"
%
(
entry
.
name
,
entry
.
type
)
)
resolve_dependancy
(
entry
)
# Deal with simple circular dependancies...
for
entry
,
deps
in
dependancies_by_entry
.
items
():
...
...
@@ -202,7 +202,7 @@ class SimpleAssignmentTypeInferer:
for
entry
in
dependancies_by_entry
:
entry
.
type
=
py_object_type
if
verbose
:
warning
(
entry
.
pos
,
"inferred '%s' to be of type '%s' (default)"
%
(
entry
.
name
,
entry
.
type
),
1
)
message
(
entry
.
pos
,
"inferred '%s' to be of type '%s' (default)"
%
(
entry
.
name
,
entry
.
type
)
)
def
find_spanning_type
(
type1
,
type2
):
if
type1
is
type2
:
...
...
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