Nasal removecommand: use a return value
Change removecommand() to indicate success or failure via a return value: 1 for success, 0 for failure.
This commit is contained in:
parent
c6cb845f90
commit
1fd5502e9b
1 changed files with 2 additions and 2 deletions
|
@ -838,9 +838,9 @@ static naRef f_removeCommand(naContext c, naRef me, int argc, naRef* args)
|
|||
const string commandName(naStr_data(args[0]));
|
||||
bool ok = nasalSys->removeCommand(commandName);
|
||||
if (!ok) {
|
||||
naRuntimeError(c, "Failed to remove command:%s", commandName.c_str());
|
||||
return naNum(0);
|
||||
}
|
||||
return naNil();
|
||||
return naNum(1);
|
||||
}
|
||||
|
||||
static naRef f_open(naContext c, naRef me, int argc, naRef* args)
|
||||
|
|
Loading…
Add table
Reference in a new issue