+const char *mlua_reggets(int tk)
+{
+ if (registry[tk].type != REG_STR)
+ return NULL;
+ return registry[tk].s;
+}
+
+int mlua_reggeti(int tk)
+{
+ if (registry[tk].type != REG_INT)
+ return -1;
+ return registry[tk].i;
+}
+
+void mlua_regsets(int tk, const char *s)
+{
+ reg_entry_wipe(registry + tk);
+ registry[tk].type = REG_STR;
+ registry[tk].s = m_strdup(s);
+}
+
+void mlua_regseti(int tk, int i)
+{
+ reg_entry_wipe(registry + tk);
+ registry[tk].type = REG_INT;
+ registry[tk].i = i;
+}