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

View File

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