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
6f83687d
Commit
6f83687d
authored
Dec 01, 2015
by
Emmanuel Gil Peyrot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don’t crash when a C class isn’t defined in the pxd.
Fixes #279
parent
d3d729e3
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 @
6f83687d
...
...
@@ -2185,6 +2185,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 @
6f83687d
# mode: error
cdef
class
Test
tests/errors/pure_cclass_without_body.py
0 → 100644
View file @
6f83687d
# 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