|
|
@ -165,12 +165,14 @@ static command_result command(color_ostream & out, std::vector<std::string> & pa
|
|
|
|
|
|
|
|
|
|
|
|
ToCheck ref;
|
|
|
|
ToCheck ref;
|
|
|
|
ref.path.push_back(parameters.at(0));
|
|
|
|
ref.path.push_back(parameters.at(0));
|
|
|
|
|
|
|
|
ref.path.push_back(""); // tell check_struct that it is a pointer
|
|
|
|
ref.ptr = get_object_ref(State, -1);
|
|
|
|
ref.ptr = get_object_ref(State, -1);
|
|
|
|
lua_getfield(State, -1, "_type");
|
|
|
|
lua_getfield(State, -1, "_type");
|
|
|
|
lua_getfield(State, -1, "_identity");
|
|
|
|
lua_getfield(State, -1, "_identity");
|
|
|
|
ref.identity = reinterpret_cast<type_identity *>(lua_touserdata(State, -1));
|
|
|
|
ref.identity = reinterpret_cast<type_identity *>(lua_touserdata(State, -1));
|
|
|
|
if (!ref.identity)
|
|
|
|
if (!ref.identity)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
out.printerr("could not determine type identity\n");
|
|
|
|
return CR_FAILURE;
|
|
|
|
return CR_FAILURE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|