* Remove global variable psLocalVars which was __always__ NULL
* Remove unused function scriptClearLocalVariables() (which was effectively a NOP due to psLocalVars being NULL) git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4691 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
f494f40dde
commit
457c7005f3
|
@ -334,9 +334,6 @@ extern BOOL scriptLookUpCallback(const char *pIdent, CALLBACK_SYMBOL **ppsCallba
|
|||
/* Lookup an event symbol */
|
||||
extern BOOL scriptLookUpEvent(const char *pIdent, EVENT_SYMBOL **ppsEvent);
|
||||
|
||||
/* Reset the local variable symbol table */
|
||||
extern void scriptClearLocalVariables(void);
|
||||
|
||||
/* Add a new function symbol */
|
||||
extern BOOL scriptStartFunctionDef(const char *pIdent, // Functions name
|
||||
INTERP_TYPE type); // return type
|
||||
|
|
|
@ -101,9 +101,6 @@ static VAR_SYMBOL *psGlobalVars=NULL;
|
|||
/* The list of global arrays */
|
||||
static VAR_SYMBOL *psGlobalArrays=NULL;
|
||||
|
||||
/* The list of current local variables */
|
||||
static VAR_SYMBOL *psLocalVars=NULL;
|
||||
|
||||
#define maxEventsLocalVars 1200
|
||||
static VAR_SYMBOL *psLocalVarsB[maxEventsLocalVars]; /* local var storage */
|
||||
static UDWORD numEventLocalVars[maxEventsLocalVars]; /* number of declard local vars for each event */
|
||||
|
@ -5904,20 +5901,6 @@ BOOL scriptLookUpType(const char *pIdent, INTERP_TYPE *pType)
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* Reset the local variable symbol table at the end of a function */
|
||||
void scriptClearLocalVariables(void)
|
||||
{
|
||||
VAR_SYMBOL *psCurr, *psNext;
|
||||
|
||||
for(psCurr = psLocalVars; psCurr != NULL; psCurr = psNext)
|
||||
{
|
||||
psNext = psCurr->psNext;
|
||||
free(psCurr->pIdent);
|
||||
free(psCurr);
|
||||
}
|
||||
}
|
||||
|
||||
/* pop passed arguments (if any) */
|
||||
BOOL popArguments(INTERP_VAL **ip_temp, SDWORD numParams)
|
||||
{
|
||||
|
@ -6066,17 +6049,6 @@ BOOL scriptLookUpVariable(const char *pIdent, VAR_SYMBOL **ppsSym)
|
|||
}
|
||||
}
|
||||
|
||||
/* See if the symbol is in the local variable list */
|
||||
for(psCurr = psLocalVars; psCurr != NULL; psCurr = psCurr->psNext)
|
||||
{
|
||||
if (strcmp(psCurr->pIdent, pIdent) == 0)
|
||||
{
|
||||
//debug(LOG_SCRIPT, "scriptLookUpVariable: local");
|
||||
*ppsSym = psCurr;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* check local vars if we are inside of an event */
|
||||
if(psCurEvent != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue