[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: What are the major differences between lua_pushliteral and lua_pushstring?
- From: 孙世龙 sunshilong <sunshilong369@...>
- Date: Thu, 3 Dec 2020 10:25:42 +0800
As per the documentation(https://www.lua.org/manual/5.3/manual.html#lua_pushliteral),
which says that: This macro is equivalent to lua_pushstring, but
should be used only when s is a literal string.
I can't understand the explanation aforementioned at all. As far as I
can see, there is no difference from the macro definition for
lua_pushliteral:
#define lua_pushliteral(L, s) lua_pushstring(L, "" s)
If there is something wrong, please let me know.
Thank you for your attention to my question.
Best regards