- allow scriptcontext objects to be dynamic
- enhancements in scriptcontext (error messages stored as properties)
This commit is contained in:
12
SCinter.c
12
SCinter.c
@ -213,7 +213,9 @@ int RemoveCommand(SicsInterp * pInterp, char *pName)
|
||||
/* found, remove it */
|
||||
/* kall KillFunction first */
|
||||
if (pVictim->KFunc) {
|
||||
pVictim->KFunc(pVictim->pData);
|
||||
void *data = pVictim->pData;
|
||||
pVictim->pData = NULL; /* make data unreachable by FindCommandData before killing */
|
||||
pVictim->KFunc(data);
|
||||
}
|
||||
|
||||
/* delete and unlink data */
|
||||
@ -237,7 +239,6 @@ int RemoveCommand(SicsInterp * pInterp, char *pName)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#define MAXLEN 256
|
||||
#define MAXCOM 50
|
||||
extern char *stptok(char *s, char *tok, unsigned int toklen, char *brk);
|
||||
@ -1047,10 +1048,9 @@ char *FindAliases(SicsInterp * pSics, char *name)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
void
|
||||
ForEachCommand(int (*scanFunction)
|
||||
(char *name, pDummy object, void *userData)
|
||||
, void *userData)
|
||||
void ForEachCommand(int (*scanFunction)
|
||||
(char *name, pDummy object, void *userData)
|
||||
, void *userData)
|
||||
{
|
||||
CommandList *pCurrent;
|
||||
|
||||
|
Reference in New Issue
Block a user