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
fbad192a
Commit
fbad192a
authored
Jun 11, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix e_cstruct errors
parent
59367485
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-1
tests/errors/e_cstruct.pyx
tests/errors/e_cstruct.pyx
+3
-4
No files found.
Cython/Compiler/ExprNodes.py
View file @
fbad192a
...
@@ -2017,7 +2017,8 @@ class AttributeNode(ExprNode):
...
@@ -2017,7 +2017,8 @@ class AttributeNode(ExprNode):
error
(
self
.
pos
,
error
(
self
.
pos
,
"Cannot select attribute of incomplete type '%s'"
"Cannot select attribute of incomplete type '%s'"
%
obj_type
)
%
obj_type
)
obj_type
=
PyrexTypes
.
error_type
self
.
type
=
PyrexTypes
.
error_type
return
self
.
entry
=
entry
self
.
entry
=
entry
if
entry
:
if
entry
:
if
obj_type
.
is_extension_type
and
entry
.
name
==
"__weakref__"
:
if
obj_type
.
is_extension_type
and
entry
.
name
==
"__weakref__"
:
...
...
tests/errors/e_cstruct.pyx
View file @
fbad192a
...
@@ -4,8 +4,8 @@ cdef struct Spam:
...
@@ -4,8 +4,8 @@ cdef struct Spam:
float
*
p
[
42
]
float
*
p
[
42
]
obj
# error - py object
obj
# error - py object
cdef
struct
Spam
:
# error - redefined
#cdef struct Spam: # error - redefined (not an error in Cython, should it be?)
int
j
#
int j
cdef
struct
Grail
cdef
struct
Grail
...
@@ -19,9 +19,8 @@ cdef void eggs(Spam s):
...
@@ -19,9 +19,8 @@ cdef void eggs(Spam s):
j
.
i
=
j
# error - no attributes
j
.
i
=
j
# error - no attributes
j
=
gp
.
x
# error - incomplete type
j
=
gp
.
x
# error - incomplete type
gp
.
x
=
j
# error - incomplete type
gp
.
x
=
j
# error - incomplete type
_ERRORS
=
u"""
_ERRORS
=
u"""
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_cstruct.pyx:5:36: C struct/union member cannot be a Python object
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_cstruct.pyx:5:36: C struct/union member cannot be a Python object
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_cstruct.pyx:7:5: 'Spam' already defined
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_cstruct.pyx:15:6: Object of type 'Spam' has no attribute 'k'
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_cstruct.pyx:15:6: Object of type 'Spam' has no attribute 'k'
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_cstruct.pyx:16:6: Cannot assign type 'float *[42]' to 'int'
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_cstruct.pyx:16:6: Cannot assign type 'float *[42]' to 'int'
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_cstruct.pyx:17:21: Cannot assign type 'int' to 'float *[42]'
/Local/Projects/D/Pyrex/Source/Tests/Errors2/e_cstruct.pyx:17:21: Cannot assign type 'int' to 'float *[42]'
...
...
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