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
736e7bda
Commit
736e7bda
authored
9 years ago
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #469 from linkmauve/check-cclass-define
Don’t crash when a C class isn’t defined in the pxd
parents
80088661
6f83687d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+2
-0
tests/errors/pure_cclass_without_body.pxd
tests/errors/pure_cclass_without_body.pxd
+3
-0
tests/errors/pure_cclass_without_body.py
tests/errors/pure_cclass_without_body.py
+8
-0
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
736e7bda
...
@@ -2191,6 +2191,8 @@ class AlignFunctionDefinitions(CythonTransform):
...
@@ -2191,6 +2191,8 @@ class AlignFunctionDefinitions(CythonTransform):
if
pxd_def
is
None
:
if
pxd_def
is
None
:
pxd_def
=
self
.
scope
.
lookup
(
node
.
class_name
)
pxd_def
=
self
.
scope
.
lookup
(
node
.
class_name
)
if
pxd_def
:
if
pxd_def
:
if
not
pxd_def
.
defined_in_pxd
:
return
node
outer_scope
=
self
.
scope
outer_scope
=
self
.
scope
self
.
scope
=
pxd_def
.
type
.
scope
self
.
scope
=
pxd_def
.
type
.
scope
self
.
visitchildren
(
node
)
self
.
visitchildren
(
node
)
...
...
This diff is collapsed.
Click to expand it.
tests/errors/pure_cclass_without_body.pxd
0 → 100644
View file @
736e7bda
# mode: error
cdef
class
Test
This diff is collapsed.
Click to expand it.
tests/errors/pure_cclass_without_body.py
0 → 100644
View file @
736e7bda
# mode: error
class
Test
(
object
):
pass
_ERRORS
=
u"""
3:5: C class 'Test' is declared but not defined
"""
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