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
Boxiang Sun
cython
Commits
f8cbb006
Commit
f8cbb006
authored
Jun 01, 2017
by
Robert Bradshaw
Committed by
GitHub
Jun 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1526 from robertwb/no-object-attrs
Limit Python conversion on attribute access.
parents
3392afe9
2bfc14c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
CHANGES.rst
CHANGES.rst
+3
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-1
No files found.
CHANGES.rst
View file @
f8cbb006
...
...
@@ -54,6 +54,9 @@ Other changes
* The `unraisable_tracebacks` now defaults to `True`.
* Coercion of C++ containers to Python is no longer automatic on attribute
access (Github issue #1521).
0.25.2 (2016-12-08)
===================
...
...
Cython/Compiler/ExprNodes.py
View file @
f8cbb006
...
...
@@ -6578,7 +6578,10 @@ class AttributeNode(ExprNode):
self
.
type
=
py_object_type
self
.
is_py_attr
=
1
if
not
obj_type
.
is_pyobject
and
not
obj_type
.
is_error
:
if
obj_type
.
can_coerce_to_pyobject
(
env
):
# Expose python methods for immutable objects.
if
(
obj_type
.
is_string
or
obj_type
.
is_cpp_string
or
obj_type
.
is_buffer
or
obj_type
.
is_numeric
or
(
obj_type
.
is_struct
and
obj_type
.
can_coerce_to_pyobject
(
env
))):
if
not
immutable_obj
:
self
.
obj
=
self
.
obj
.
coerce_to_pyobject
(
env
)
elif
(
obj_type
.
is_cfunction
and
(
self
.
obj
.
is_name
or
self
.
obj
.
is_attribute
)
...
...
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