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
198906bd
Commit
198906bd
authored
Nov 01, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a case where C array coercion helper code could be duplicated in the C file
parent
153a2217
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+3
-0
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+3
-5
No files found.
Cython/Compiler/PyrexTypes.py
View file @
198906bd
...
@@ -2247,6 +2247,9 @@ class CArrayType(CPointerBaseType):
...
@@ -2247,6 +2247,9 @@ class CArrayType(CPointerBaseType):
else
:
else
:
return
None
return
None
def
can_coerce_to_pyobject
(
self
,
env
):
return
self
.
base_type
.
can_coerce_to_pyobject
(
env
)
def
create_to_py_utility_code
(
self
,
env
):
def
create_to_py_utility_code
(
self
,
env
):
if
self
.
to_py_function
is
not
None
:
if
self
.
to_py_function
is
not
None
:
return
self
.
to_py_function
return
self
.
to_py_function
...
...
Cython/Compiler/Symtab.py
View file @
198906bd
...
@@ -1893,11 +1893,9 @@ class CClassScope(ClassScope):
...
@@ -1893,11 +1893,9 @@ class CClassScope(ClassScope):
if
name
==
"__weakref__"
:
if
name
==
"__weakref__"
:
error
(
pos
,
"Special attribute __weakref__ cannot be exposed to Python"
)
error
(
pos
,
"Special attribute __weakref__ cannot be exposed to Python"
)
if
not
type
.
is_pyobject
:
if
not
type
.
is_pyobject
:
if
(
not
type
.
create_to_py_utility_code
(
self
)
or
if
(
not
type
.
can_coerce_to_pyobject
(
self
)
or
(
visibility
==
'public'
and
not
(
visibility
==
'public'
and
not
type
.
can_coerce_to_pyobject
(
self
))):
type
.
create_from_py_utility_code
(
self
))):
error
(
pos
,
"C attribute of type '%s' cannot be accessed from Python"
%
type
)
error
(
pos
,
"C attribute of type '%s' cannot be accessed from Python"
%
type
)
else
:
else
:
entry
.
needs_property
=
False
entry
.
needs_property
=
False
return
entry
return
entry
...
...
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