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
736e7bda
Commit
736e7bda
authored
Feb 02, 2016
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
Hide 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):
if
pxd_def
is
None
:
pxd_def
=
self
.
scope
.
lookup
(
node
.
class_name
)
if
pxd_def
:
if
not
pxd_def
.
defined_in_pxd
:
return
node
outer_scope
=
self
.
scope
self
.
scope
=
pxd_def
.
type
.
scope
self
.
visitchildren
(
node
)
...
...
tests/errors/pure_cclass_without_body.pxd
0 → 100644
View file @
736e7bda
# mode: error
cdef
class
Test
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
"""
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