|
From: Irfan Adilovic <irfanadilovic@gmail.com> Reply: Lua mailing list <lua-l@lists.lua.org> Date: 26 June 2016 at 17:11:47 To: lua-l@lists.lua.org <lua-l@lists.lua.org> Subject: [patch][c++] fix "invalid conversion from ‘void*’ to ‘char*’"
There is a similar issue in lobject.c with respect to lua-as-C++. diff --git a/lua-5.3.3/src/lobject.c b/lua-5.3.3/src/lobject.c index a44b385..2542d9f 100644 --- a/lua-5.3.3/src/lobject.c +++ b/lua-5.3.3/src/lobject.c @@ -280,7 +280,7 @@ static const char *l_str2d (const char *s, lua_Number *result) { endptr = l_str2dloc(s, result, mode); /* try to convert */ if (endptr == NULL) { /* failed? may be a different locale */ char buff[L_MAXLENNUM + 1]; - char *pdot = strchr(s, '.'); + const char *pdot = strchr(s, '.'); if (strlen(s) > L_MAXLENNUM || pdot == NULL) return NULL; /* string too long or no dot; fail */ strcpy(buff, s); /* copy string to buffer */ Scott |