This commit is contained in:
Jesse van den Kieboom 2005-11-15 12:01:47 +00:00
parent e1463f369c
commit 6652d8380c
1 changed files with 7 additions and 6 deletions

View File

@ -17,6 +17,7 @@
#include "gm-scripts.h"
#include "gm-support.h"
#include "gm-world.h"
#include "gm-string.h"
#define GM_SCRIPTS_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), \
GM_TYPE_SCRIPTS, GmScriptsPrivate))
@ -353,18 +354,18 @@ VALUE
gm_scripts_run_function(GmScriptInfo *arg) {
VALUE ret;
gchar *argstr;
gchar *funcAll;
gchar *func_all;
if (arg->argstr) {
argstr = gm_str_escape(arg->argstr);
funcAll = g_strconcat(arg->name, "(\"", argstr, "\")", NULL);
argstr = gm_string_escape(arg->argstr);
func_all = g_strconcat(arg->name, "(\"", argstr, "\")", NULL);
g_free(argstr);
} else {
funcAll = g_strconcat(arg->name, "()", NULL);
func_all = g_strconcat(arg->name, "()", NULL);
}
ret = rb_eval_string(funcAll);
g_free(funcAll);
ret = rb_eval_string(func_all);
g_free(func_all);
return ret;
}