save cleanup

This commit is contained in:
p.kosyh 2010-07-11 14:26:13 +00:00
parent 2e0924616d
commit 4a6b07b499
2 changed files with 11 additions and 28 deletions

View file

@ -48,21 +48,12 @@ function vobj_save(self, name, h, need)
local w = deref(self.where)
local dsc = self.dsc
if dsc == nil then
dsc = 'nil';
else
dsc = stead.string.format("%q", tostring(dsc))
end
if w == nil then
w = "nil"
else
w = stead.string.format("%q", w)
end
if need then
h:write(stead.string.format("%s = vobj(%q,%s,%s);\n",
name, tostring(self.nam), dsc, w));
h:write(stead.string.format("%s = vobj(%s,%s,%s);\n",
name,
stead.tostring(self.nam),
stead.tostring(dsc),
stead.tostring(w)));
end
savemembers(h, self, name, false);
end

View file

@ -2063,21 +2063,13 @@ function vobj_save(self, name, h, need)
local dsc = self.dsc;
local w = deref(self.where);
if dsc == nil then
dsc = 'nil';
else
dsc = stead.string.format("%q", tostring(dsc))
end
if w == nil then
w = 'nil';
else
w = stead.string.format("%q", w)
end
if need then
h:write(stead.string.format("%s = vobj(%s, %q, %s, %s);\n",
name, tostring(self.key), tostring(self.nam), dsc, w));
h:write(stead.string.format("%s = vobj(%s, %s, %s, %s);\n",
name,
stead.tostring(self.key),
stead.tostring(self.nam),
stead.tostring(dsc),
stead.tostring(w)));
end
savemembers(h, self, name,false);