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
Kirill Smelkov
cython
Commits
5ac3fb63
Commit
5ac3fb63
authored
Apr 28, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.3 compatability, error message tests
parent
ce72af67
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+6
-5
tests/errors/encoding.pyx
tests/errors/encoding.pyx
+9
-0
tests/errors/void_as_arg.pyx
tests/errors/void_as_arg.pyx
+6
-0
No files found.
Cython/Compiler/Main.py
View file @
5ac3fb63
...
...
@@ -150,11 +150,12 @@ class Context:
name
=
source_filename
.
decode
(
filename_encoding
)
try
:
s
=
PyrexScanner
(
f
,
name
,
source_encoding
=
f
.
encoding
,
type_names
=
type_names
,
context
=
self
)
tree
=
Parsing
.
p_module
(
s
,
pxd
,
full_module_name
)
except
UnicodeDecodeError
,
msg
:
error
((
name
,
0
,
0
),
"Decoding error, set coding=<encoding-name> at top of source (%s)"
%
msg
)
try
:
s
=
PyrexScanner
(
f
,
name
,
source_encoding
=
f
.
encoding
,
type_names
=
type_names
,
context
=
self
)
tree
=
Parsing
.
p_module
(
s
,
pxd
,
full_module_name
)
except
UnicodeDecodeError
,
msg
:
error
((
name
,
0
,
0
),
"Decoding error, missing or incorrect coding=<encoding-name> at top of source (%s)"
%
msg
)
finally
:
f
.
close
()
if
Errors
.
num_errors
>
0
:
...
...
tests/errors/encoding.pyx
0 → 100644
View file @
5ac3fb63
# coding=ASCII
"""
Trs bien.
"""
_ERRORS
=
"""
0:0:Decoding error, missing or incorrect coding=<encoding-name> at top of source ('ascii' codec can't decode byte 0x8f in position 22: ordinal not in range(128))
"""
tests/errors/void_as_arg.pyx
0 → 100644
View file @
5ac3fb63
cdef
extern
from
*
:
void
foo
(
void
)
_ERRORS
=
"""
2:13:Use spam() rather than spam(void) to declare a function with no arguments.
"""
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