/[svn]/linuxsampler/trunk/src/scriptvm/CoreVMFunctions.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/CoreVMFunctions.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3574 by schoenebeck, Tue Aug 27 21:36:53 2019 UTC revision 3575 by schoenebeck, Wed Aug 28 11:12:04 2019 UTC
# Line 119  vmint CoreVMFunction_exit::maxAllowedArg Line 119  vmint CoreVMFunction_exit::maxAllowedArg
119    
120  bool CoreVMFunction_exit::acceptsArgType(vmint iArg, ExprType_t type) const {  bool CoreVMFunction_exit::acceptsArgType(vmint iArg, ExprType_t type) const {
121      if (!vm->isExitResultEnabled()) return false;      if (!vm->isExitResultEnabled()) return false;
122      return type == INT_EXPR || type == STRING_EXPR;      return type == INT_EXPR || type == REAL_EXPR || type == STRING_EXPR;
123  }  }
124    
125  VMFnResult* CoreVMFunction_exit::exec(VMFnArgs* args) {  VMFnResult* CoreVMFunction_exit::exec(VMFnArgs* args) {
# Line 131  VMFnResult* CoreVMFunction_exit::exec(VM Line 131  VMFnResult* CoreVMFunction_exit::exec(VM
131                  ctx->exitRes.intLiteral.value = args->arg(0)->asInt()->evalInt();                  ctx->exitRes.intLiteral.value = args->arg(0)->asInt()->evalInt();
132                  ctx->exitRes.value = &ctx->exitRes.intLiteral;                  ctx->exitRes.value = &ctx->exitRes.intLiteral;
133                  break;                  break;
134                case REAL_EXPR:
135                    ctx->exitRes.realLiteral.value = args->arg(0)->asReal()->evalReal();
136                    ctx->exitRes.value = &ctx->exitRes.realLiteral;
137                    break;
138              case STRING_EXPR:              case STRING_EXPR:
139                  ctx->exitRes.stringLiteral.value = args->arg(0)->asString()->evalStr();                  ctx->exitRes.stringLiteral.value = args->arg(0)->asString()->evalStr();
140                  ctx->exitRes.value = &ctx->exitRes.stringLiteral;                  ctx->exitRes.value = &ctx->exitRes.stringLiteral;

Legend:
Removed from v.3574  
changed lines
  Added in v.3575

  ViewVC Help
Powered by ViewVC