Hi,

Zack Weinberg wrote:
> well, you could always do the moral equivalent in C:
> 
>   lua_getglobal(L, "_VERSION");
>   std::string luaversion(lua_tostring(L, -1)); // copies
>   lua_pop(L, 1);

Hm.. I've tried that and stumbled over two problems. One is, that
mt_version.cc doesn't have access to a Lua_state object (and gets called
from sanity.cc, which doesn't either).

The other one is, the patch version isn't included in the _VERSION
global variable:

> # lua
> Lua 5.1.3  Copyright (C) 1994-2008 Lua.org, PUC-Rio
>> print(_VERSION)
> Lua 5.1
>> 

So there's utterly no point in showing that, since we (build time)
require 5.1.x anyway.

I've thus reverted to show only 'Lua 5.1' in rev
6b777e3eb453b3b0be4d9aaa93e81cd56c6ca635. (As opposed to showing the
patch version (i.e. "5.1.3") we've built against).

Regards

Markus Wanner





_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to