Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
Python
Modules
cython
Commits
5b55829c55ce
Commit
5b55829c55ce
authored
15 years ago
by
Robert Bradshaw
Browse files
Options
Downloads
Patches
Plain Diff
New message(...) distinct from warn(...)
parent
a38345597938
Branches
Branches containing commit
No related tags found
Loading
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Cython/Compiler/Errors.py
+11
-0
11 additions, 0 deletions
Cython/Compiler/Errors.py
Cython/Compiler/TypeInference.py
+3
-3
3 additions, 3 deletions
Cython/Compiler/TypeInference.py
with
14 additions
and
3 deletions
Cython/Compiler/Errors.py
+
11
−
0
View file @
5b55829c
...
@@ -139,6 +139,17 @@
...
@@ -139,6 +139,17 @@
LEVEL
=
1
# warn about all errors level 1 or higher
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
):
def
warning
(
position
,
message
,
level
=
0
):
if
level
<
LEVEL
:
if
level
<
LEVEL
:
return
return
...
...
This diff is collapsed.
Click to expand it.
Cython/Compiler/TypeInference.py
+
3
−
3
View file @
5b55829c
from
Errors
import
error
,
warning
,
warn_once
,
InternalError
from
Errors
import
error
,
warning
,
message
,
warn_once
,
InternalError
import
ExprNodes
import
ExprNodes
import
Nodes
import
Nodes
import
Builtin
import
Builtin
...
@@ -181,7 +181,7 @@
...
@@ -181,7 +181,7 @@
# print "No assignments", entry.pos, entry
# print "No assignments", entry.pos, entry
entry
.
type
=
py_object_type
entry
.
type
=
py_object_type
if
verbose
:
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
)
resolve_dependancy
(
entry
)
# Deal with simple circular dependancies...
# Deal with simple circular dependancies...
for
entry
,
deps
in
dependancies_by_entry
.
items
():
for
entry
,
deps
in
dependancies_by_entry
.
items
():
...
@@ -202,7 +202,7 @@
...
@@ -202,7 +202,7 @@
for
entry
in
dependancies_by_entry
:
for
entry
in
dependancies_by_entry
:
entry
.
type
=
py_object_type
entry
.
type
=
py_object_type
if
verbose
:
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
):
def
find_spanning_type
(
type1
,
type2
):
if
type1
is
type2
:
if
type1
is
type2
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment