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
7c0ea3b0
Commit
7c0ea3b0
authored
Aug 16, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix public extensions declared in pxd files.
parent
d75b726f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+0
-9
tests/run/extmember.pyx
tests/run/extmember.pyx
+15
-1
No files found.
Cython/Compiler/Nodes.py
View file @
7c0ea3b0
...
...
@@ -2151,15 +2151,6 @@ class CClassDefNode(ClassDefNode):
if
self
.
doc
and
Options
.
docstrings
:
scope
.
doc
=
embed_position
(
self
.
pos
,
self
.
doc
)
if
has_body
and
not
self
.
in_pxd
:
# transforms not yet run on pxd files
from
ParseTreeTransforms
import
AnalyseDeclarationsTransform
transform
=
AnalyseDeclarationsTransform
(
None
)
for
entry
in
scope
.
var_entries
:
if
hasattr
(
entry
,
'needs_property'
):
property
=
transform
.
create_Property
(
entry
)
self
.
body
.
stats
.
append
(
property
)
if
has_body
:
self
.
body
.
analyse_declarations
(
scope
)
if
self
.
in_pxd
:
...
...
tests/run/extmember.pyx
View file @
7c0ea3b0
...
...
@@ -7,7 +7,21 @@ __doc__ = """
>>> s.e is s
True
>>> s.e = None
>>> s = Bot()
>>> s.e = s
>>> s.e = 1
Traceback (most recent call last):
TypeError: Cannot convert int to extmember.Bot
>>> s.e is s
True
>>> s.e = None
"""
# declared in the pxd
cdef
class
Spam
:
cdef
public
Spam
e
pass
# not declared in the pxd
cdef
class
Bot
:
cdef
public
Bot
e
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