Compare commits
2 Commits
ea070399fc
...
6ad8eb6230
Author | SHA1 | Date | |
---|---|---|---|
6ad8eb6230 | |||
1b6b2435ed |
@ -188,7 +188,7 @@ void PushVector(lua_State* L, const nf7::Value::ConstVector& v) noexcept {
|
||||
if (lua_istable(L, -1)) { // array
|
||||
lua_rawgeti(L, -1, 1);
|
||||
const std::string_view type = luaL_checkstring(L, -1);
|
||||
lua_rawgeti(L, -1, 2);
|
||||
lua_rawgeti(L, -2, 2);
|
||||
const size_t n = static_cast<size_t>(luaL_checkinteger(L, -1));
|
||||
lua_pop(L, 2);
|
||||
|
||||
@ -553,6 +553,7 @@ static size_t PushArrayFromBytes(lua_State* L, size_t n, const uint8_t* ptr, con
|
||||
[] <bool F = false>() { static_assert(F, "T is invalid"); }();
|
||||
}
|
||||
lua_rawseti(L, -2, static_cast<int>(i + 1));
|
||||
ptr += sizeof(T);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
@ -204,7 +204,11 @@ static void PushMeta(lua_State* L) noexcept {
|
||||
const int n = lua_gettop(L);
|
||||
std::stringstream st;
|
||||
for (int i = 2; i <= n; ++i) {
|
||||
st << lua_tostring(L, i);
|
||||
if (auto msg = lua_tostring(L, i)) {
|
||||
st << msg;
|
||||
} else {
|
||||
return luaL_error(L, "cannot stringify %s", luaL_typename(L, i));
|
||||
}
|
||||
}
|
||||
logger->Write({lv, st.str()});
|
||||
return 0;
|
||||
|
@ -39,7 +39,7 @@ namespace {
|
||||
class InlineNode final : public nf7::FileBase, public nf7::DirItem, public nf7::Node {
|
||||
public:
|
||||
static inline const nf7::GenericTypeInfo<InlineNode> kType =
|
||||
{"LuaJIT/InlineNode", {"nf7::Node"}};
|
||||
{"LuaJIT/InlineNode", {"nf7::DirItem", "nf7::Node"}};
|
||||
static void UpdateTypeTooltip() noexcept {
|
||||
ImGui::TextUnformatted("Defines new Node using Lua object factory.");
|
||||
ImGui::Bullet();
|
||||
|
Loading…
x
Reference in New Issue
Block a user