mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-06 15:11:13 +00:00
Lunatic: one const char * --> char *, since we alloc/free it.
git-svn-id: https://svn.eduke32.com/eduke32@2722 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ae15643a73
commit
b3a6b0a93b
2 changed files with 4 additions and 4 deletions
|
@ -36,7 +36,7 @@ int32_t El_CreateState(El_State *estate, const char *name)
|
||||||
|
|
||||||
if (!estate->L)
|
if (!estate->L)
|
||||||
{
|
{
|
||||||
Bfree((char *)estate->name);
|
Bfree(estate->name);
|
||||||
estate->name = NULL;
|
estate->name = NULL;
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ void El_DestroyState(El_State *estate)
|
||||||
if (!estate->L)
|
if (!estate->L)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Bfree((char *)estate->name);
|
Bfree(estate->name);
|
||||||
estate->name = NULL;
|
estate->name = NULL;
|
||||||
|
|
||||||
lua_close(estate->L);
|
lua_close(estate->L);
|
||||||
|
@ -124,7 +124,7 @@ int32_t El_RunOnce(El_State *estate, const char *fn)
|
||||||
|
|
||||||
if (i == LUA_ERRRUN)
|
if (i == LUA_ERRRUN)
|
||||||
{
|
{
|
||||||
assert(lua_type(estate->L, -1)==LUA_TSTRING);
|
Bassert(lua_type(estate->L, -1)==LUA_TSTRING);
|
||||||
OSD_Printf("state \"%s\" runtime error: %s\n", estate->name, lua_tostring(estate->L, -1)); // get err msg
|
OSD_Printf("state \"%s\" runtime error: %s\n", estate->name, lua_tostring(estate->L, -1)); // get err msg
|
||||||
lua_pop(estate->L, 1);
|
lua_pop(estate->L, 1);
|
||||||
return 4;
|
return 4;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const char *name;
|
char *name;
|
||||||
lua_State *L;
|
lua_State *L;
|
||||||
} El_State;
|
} El_State;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue