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
Gwenaël Samain
cython
Commits
bd6a80ee
Commit
bd6a80ee
authored
16 years ago
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ticket #98, better error reporting on bad types.
parent
aa3dfd5f
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+4
-0
tests/errors/e_badtypeuse.pyx
tests/errors/e_badtypeuse.pyx
+4
-0
No files found.
Cython/Compiler/PyrexTypes.py
View file @
bd6a80ee
...
...
@@ -1313,6 +1313,8 @@ def c_array_type(base_type, size):
# Construct a C array type.
if
base_type
is
c_char_type
:
return
CCharArrayType
(
size
)
elif
base_type
is
error_type
:
return
error_type
else
:
return
CArrayType
(
base_type
,
size
)
...
...
@@ -1320,6 +1322,8 @@ def c_ptr_type(base_type):
# Construct a C pointer type.
if
base_type
is
c_char_type
:
return
c_char_ptr_type
elif
base_type
is
error_type
:
return
error_type
else
:
return
CPtrType
(
base_type
)
...
...
This diff is collapsed.
Click to expand it.
tests/errors/e_badtypeuse.pyx
View file @
bd6a80ee
...
...
@@ -19,6 +19,9 @@ cdef f(Grail g, # incomplete argument type
void
v
,
# incomplete argument type
int
a
[]):
pass
cdef
NoSuchType
*
ptr
ptr
=
None
# This should not produce another error
_ERRORS
=
u"""
3:19: Python object cannot be declared extern
...
...
@@ -35,4 +38,5 @@ _ERRORS = u"""
19:1: Use spam() rather than spam(void) to declare a function with no arguments.
18:7: Argument type 'Grail' is incomplete
19:1: Invalid use of 'void'
23:5: 'NoSuchType' is not a type identifier
"""
This diff is collapsed.
Click to expand it.
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