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
Gwenaël Samain
cython
Commits
bdc95095
Commit
bdc95095
authored
May 23, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merge 0.20.x branch into master
parents
fea7ad6e
135e52d5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
1 deletion
+36
-1
CHANGES.rst
CHANGES.rst
+3
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-1
tests/run/append.pyx
tests/run/append.pyx
+8
-0
tests/run/list_pop.pyx
tests/run/list_pop.pyx
+8
-0
tests/run/qualname.pyx
tests/run/qualname.pyx
+16
-0
No files found.
CHANGES.rst
View file @
bdc95095
...
@@ -63,6 +63,9 @@ Features added
...
@@ -63,6 +63,9 @@ Features added
Bugs fixed
Bugs fixed
----------
----------
* Access to attributes of optimised builtin methods (e.g.
``[].append.__name__``) could fail to compile.
* Memory leak when extension subtypes add a memory view as attribute
* Memory leak when extension subtypes add a memory view as attribute
to those of the parent type without having Python object attributes
to those of the parent type without having Python object attributes
or a user provided dealloc method.
or a user provided dealloc method.
...
...
Cython/Compiler/ExprNodes.py
View file @
bdc95095
...
@@ -5445,7 +5445,7 @@ class AttributeNode(ExprNode):
...
@@ -5445,7 +5445,7 @@ class AttributeNode(ExprNode):
if
obj_type
.
can_coerce_to_pyobject
(
env
):
if
obj_type
.
can_coerce_to_pyobject
(
env
):
if
not
immutable_obj
:
if
not
immutable_obj
:
self
.
obj
=
self
.
obj
.
coerce_to_pyobject
(
env
)
self
.
obj
=
self
.
obj
.
coerce_to_pyobject
(
env
)
elif
(
obj_type
.
is_cfunction
and
self
.
obj
.
is_name
elif
(
obj_type
.
is_cfunction
and
(
self
.
obj
.
is_name
or
self
.
obj
.
is_attribute
)
and
self
.
obj
.
entry
.
as_variable
and
self
.
obj
.
entry
.
as_variable
and
self
.
obj
.
entry
.
as_variable
.
type
.
is_pyobject
):
and
self
.
obj
.
entry
.
as_variable
.
type
.
is_pyobject
):
# might be an optimised builtin function => unpack it
# might be an optimised builtin function => unpack it
...
...
tests/run/append.pyx
View file @
bdc95095
...
@@ -63,3 +63,11 @@ def append_unused_retval(L):
...
@@ -63,3 +63,11 @@ def append_unused_retval(L):
except
TypeError
:
except
TypeError
:
print
u"got error"
print
u"got error"
return
L
return
L
def
method_name
():
"""
>>> method_name()
'append'
"""
return
[].
append
.
__name__
tests/run/list_pop.pyx
View file @
bdc95095
...
@@ -203,6 +203,14 @@ def crazy_pop(L):
...
@@ -203,6 +203,14 @@ def crazy_pop(L):
return
L
.
pop
(
1
,
2
,
3
)
return
L
.
pop
(
1
,
2
,
3
)
def
method_name
():
"""
>>> method_name()
'pop'
"""
return
[].
pop
.
__name__
def
object_pop_large_int
():
def
object_pop_large_int
():
"""
"""
>>> object_pop_large_int()
>>> object_pop_large_int()
...
...
tests/run/qualname.pyx
View file @
bdc95095
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
# mode: run
# mode: run
# tag: cyfunction,qualname
# tag: cyfunction,qualname
import
sys
def
test_qualname
():
def
test_qualname
():
"""
"""
...
@@ -16,6 +18,20 @@ def test_qualname():
...
@@ -16,6 +18,20 @@ def test_qualname():
"""
"""
def
test_builtin_qualname
():
"""
>>> test_builtin_qualname()
list.append
len
"""
if
sys
.
version_info
>=
(
3
,
3
):
print
([
1
,
2
,
3
].
append
.
__qualname__
)
print
(
len
.
__qualname__
)
else
:
print
(
'list.append'
)
print
(
'len'
)
def
test_nested_qualname
():
def
test_nested_qualname
():
"""
"""
>>> outer, lambda_func, XYZ = test_nested_qualname()
>>> outer, lambda_func, XYZ = test_nested_qualname()
...
...
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