summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/lobject.c')
-rw-r--r--apps/plugins/lua/lobject.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/plugins/lua/lobject.c b/apps/plugins/lua/lobject.c
index a351ff41da..65a23cf938 100644
--- a/apps/plugins/lua/lobject.c
+++ b/apps/plugins/lua/lobject.c
@@ -107,6 +107,21 @@ static void pushstr (lua_State *L, const char *str) {
107} 107}
108 108
109 109
110/* ROCKLUA ADDED -- Retrieves C string from TString */
111const char *luaO_getstring(const TString * ts){
112 const char *string;
113#ifdef INBINARYSTRINGS
114 if (testbits((ts)->tsv.type, TSTR_INBIN))
115 string = *(cast(const char **, (ts) + 1));
116 else
117#else
118 if (true)
119#endif
120 string = cast(const char *, (ts) + 1);
121 return string;
122}
123
124
110/* this function handles only `%d', `%c', %f, %p, and `%s' formats */ 125/* this function handles only `%d', `%c', %f, %p, and `%s' formats */
111const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { 126const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
112 int n = 1; 127 int n = 1;