projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8aa2fe
)
don't allow pointer assignments to Python variables (except for char*)
author
Stefan Behnel
<scoder@users.berlios.de>
Tue, 20 Oct 2009 18:08:31 +0000
(20:08 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Tue, 20 Oct 2009 18:08:31 +0000
(20:08 +0200)
Cython/Compiler/PyrexTypes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/PyrexTypes.py
b/Cython/Compiler/PyrexTypes.py
index 471821327c7e6b3ea3a8669d29da0cb6cdda6a71..74fa88fb2aad4830d64c02885860a00e6e84c4bb 100644
(file)
--- a/
Cython/Compiler/PyrexTypes.py
+++ b/
Cython/Compiler/PyrexTypes.py
@@
-336,7
+336,8
@@
class PyObjectType(PyrexType):
return "<PyObjectType>"
def assignable_from(self, src_type):
- return 1 # Conversion will be attempted
+ # except for pointers, conversion will be attempted
+ return not src_type.is_ptr or src_type.is_string
def declaration_code(self, entity_code,
for_display = 0, dll_linkage = None, pyrex = 0):