summaryrefslogtreecommitdiff
path: root/python/function.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/function.py')
-rw-r--r--python/function.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/function.py b/python/function.py
index 4a80a83b..42ea5a07 100644
--- a/python/function.py
+++ b/python/function.py
@@ -874,7 +874,14 @@ class Variable(object):
@name.setter
def name(self, value):
- self._name = value
+ if self._function is None:
+ self._name = value
+ elif value is not None:
+ self._function.create_user_var(self, self._type, value)
+ self._name = value
+ else:
+ self._function.delete_user_var(self)
+ # TODO: Reset to default name!
@property
def type(self):