aboutsummaryrefslogtreecommitdiff
path: root/src/script/common/c_internal.h
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2022-10-18 18:01:44 -0400
committerGitHub <noreply@github.com>2022-10-18 18:01:44 -0400
commitb38ffdec279bcded98e34f5116c8d676aa9f73a7 (patch)
tree31cafdb009b2f81b61a96286a3800a8e408f8f3d /src/script/common/c_internal.h
parent23e9f5db4330a6efee5270160a3959422926ce77 (diff)
downloadminetest-b38ffdec279bcded98e34f5116c8d676aa9f73a7.tar.xz
Implement vector and node conversion in Lua (#12609)
Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'src/script/common/c_internal.h')
-rw-r--r--src/script/common/c_internal.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/script/common/c_internal.h b/src/script/common/c_internal.h
index 95ffe7d3b..5cbcbb7db 100644
--- a/src/script/common/c_internal.h
+++ b/src/script/common/c_internal.h
@@ -56,8 +56,14 @@ enum {
CUSTOM_RIDX_CURRENT_MOD_NAME,
CUSTOM_RIDX_BACKTRACE,
CUSTOM_RIDX_HTTP_API_LUA,
- CUSTOM_RIDX_VECTOR_METATABLE,
CUSTOM_RIDX_METATABLE_MAP,
+
+ // The following four functions are implemented in Lua because LuaJIT can
+ // trace them and optimize tables/string better than from the C API.
+ CUSTOM_RIDX_READ_VECTOR,
+ CUSTOM_RIDX_PUSH_VECTOR,
+ CUSTOM_RIDX_READ_NODE,
+ CUSTOM_RIDX_PUSH_NODE,
};