projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97cb731
)
made fields of builtin objects immutable
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 3 Dec 2010 20:17:30 +0000
(21:17 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 3 Dec 2010 20:17:30 +0000
(21:17 +0100)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index f6966165526f8a89121b8d9a835a877b27135533..d721a69ef06c06575e2d8199a2fd3851f20bf840 100755
(executable)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-3451,7
+3451,9
@@
class AttributeNode(ExprNode):
if not target:
self.is_temp = 1
self.result_ctype = py_object_type
-
+ elif target and self.obj.type.is_builtin_type:
+ error(self.pos, "Assignment to an immutable object field")
+
def analyse_attribute(self, env, obj_type = None):
# Look up attribute and set self.type and self.member.
self.is_py_attr = 0