Script binding vfuncs should be static

This commit is contained in:
Jonas Kulla 2013-09-28 21:27:11 +02:00
parent fa77726388
commit 6b94dd6bcb
2 changed files with 6 additions and 5 deletions

View File

@ -48,8 +48,8 @@
#include "binding-types.h" #include "binding-types.h"
#include "mrb-ext/marshal.h" #include "mrb-ext/marshal.h"
void mrbBindingExecute(); static void mrbBindingExecute();
void mrbBindingTerminate(); static void mrbBindingTerminate();
ScriptBinding scriptBindingImpl = ScriptBinding scriptBindingImpl =
{ {
@ -352,7 +352,7 @@ runRMXPScripts(mrb_state *mrb, mrbc_context *ctx)
mrb_close(scriptMrb); mrb_close(scriptMrb);
} }
void mrbBindingExecute() static void mrbBindingExecute()
{ {
mrb_state *mrb = mrb_open(); mrb_state *mrb = mrb_open();
@ -389,7 +389,7 @@ void mrbBindingExecute()
mrb_close(mrb); mrb_close(mrb);
} }
void mrbBindingTerminate() static void mrbBindingTerminate()
{ {
mrb_state *mrb = static_cast<mrb_state*>(gState->bindingData()); mrb_state *mrb = static_cast<mrb_state*>(gState->bindingData());
MrbData *data = static_cast<MrbData*>(mrb->ud); MrbData *data = static_cast<MrbData*>(mrb->ud);

View File

@ -34,6 +34,7 @@
#include "eventthread.h" #include "eventthread.h"
#include "exception.h" #include "exception.h"
#include "filesystem.h" #include "filesystem.h"
#include "binding.h"
#include <QDebug> #include <QDebug>
@ -162,7 +163,7 @@ MRB_FUNCTION(kernelExit)
{ {
MRB_FUN_UNUSED_PARAM; MRB_FUN_UNUSED_PARAM;
mrbBindingTerminate(); scriptBinding->terminate();
return mrb_nil_value(); return mrb_nil_value();
} }