nameof added

This commit is contained in:
p.kosyh 2010-06-27 06:04:10 +00:00
parent 0ea49d861d
commit 1bac842746
2 changed files with 9 additions and 1 deletions

3
debian/changelog vendored
View file

@ -12,7 +12,7 @@ instead (1.2.0) unstable; urgency=low
* hook and inherit; * hook and inherit;
* entered/left human friendly actions; * entered/left human friendly actions;
* stead.cmd, stead.args added; * stead.cmd, stead.args added;
* require added (modules: goto, xobj, input, click, vars, dbg, snapshot, prefs); * require added (modules: goto, xact, input, click, vars, dbg, snapshot, prefs);
* time of save slots; * time of save slots;
* check_version added; * check_version added;
* taketo/takef added; * taketo/takef added;
@ -24,6 +24,7 @@ instead (1.2.0) unstable; urgency=low
* code function!!!; * code function!!!;
* args in call; * args in call;
* self() is now self; * self() is now self;
* nameof();
* no return goto needed; * no return goto needed;
* many small bugfixes... * many small bugfixes...

View file

@ -2420,6 +2420,13 @@ function hook(o, f)
end end
stead.hook = hook stead.hook = hook
function nameof(v)
if isObject(v) then
local r = call(v, 'nam');
return r
end
end
function version(v) function version(v)
if not tostring(v) then if not tostring(v) then
return return