void CLua::setregistry(const char *name)
{
    lua_pushstring(state(), name);
    // Slide name round before the value
    lua_insert(state(), -2);
    lua_settable(state(), LUA_REGISTRYINDEX);
}
void CLua::setregistry(const char *name)
{
    lua_pushstring(state(), name);
     
    lua_insert(state(), -2);
    lua_settable(state(), LUA_REGISTRYINDEX);
}