1
0
Fork 0

Changes to support the new naCall API in SimGear. NOTE: these changes

are *not* backwards compatible, and require current SimGear to
compile.
This commit is contained in:
andy 2005-09-20 21:09:52 +00:00
parent 0bb1494452
commit 0f704b0a6e
2 changed files with 5 additions and 5 deletions

View file

@ -71,7 +71,7 @@ bool FGNasalSys::parseAndRun(const char* sourceCode)
if(naIsNil(code)) if(naIsNil(code))
return false; return false;
naCall(_context, code, naNil(), naNil(), naNil()); naCall(_context, code, 0, 0, naNil(), naNil());
if(!naGetError(_context)) return true; if(!naGetError(_context)) return true;
logError(); logError();
@ -444,7 +444,7 @@ void FGNasalSys::createModule(const char* moduleName, const char* fileName,
if(!naHash_get(_globals, modname, &locals)) if(!naHash_get(_globals, modname, &locals))
locals = naNewHash(_context); locals = naNewHash(_context);
naCall(_context, code, naNil(), naNil(), locals); naCall(_context, code, 0, 0, naNil(), locals);
if(naGetError(_context)) { if(naGetError(_context)) {
logError(); logError();
return; return;
@ -489,7 +489,7 @@ bool FGNasalSys::handleCommand(const SGPropertyNode* arg)
_cmdArg = (SGPropertyNode*)arg; _cmdArg = (SGPropertyNode*)arg;
// Call it! // Call it!
naRef result = naCall(_context, code, naNil(), naNil(), locals); naRef result = naCall(_context, code, 0, 0, naNil(), locals);
if(!naGetError(_context)) return true; if(!naGetError(_context)) return true;
logError(); logError();
return false; return false;
@ -530,7 +530,7 @@ void FGNasalSys::setTimer(int argc, naRef* args)
void FGNasalSys::handleTimer(NasalTimer* t) void FGNasalSys::handleTimer(NasalTimer* t)
{ {
naCall(_context, t->handler, naNil(), naNil(), naNil()); naCall(_context, t->handler, 0, 0, naNil(), naNil());
if(naGetError(_context)) if(naGetError(_context))
logError(); logError();
gcRelease(t->gcKey); gcRelease(t->gcKey);

View file

@ -92,7 +92,7 @@ public:
~FGNasalScript() { _nas->gcRelease(_gcKey); } ~FGNasalScript() { _nas->gcRelease(_gcKey); }
bool call() { bool call() {
naCall(_nas->_context, _code, naNil(), naNil(), naNil()); naCall(_nas->_context, _code, 0, 0, naNil(), naNil());
return naGetError(_nas->_context) == 0; return naGetError(_nas->_context) == 0;
} }