gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--agg-plot/agg_platform_support_x11.cpp 2
-rw-r--r--gsl-shell.c 21
-rw-r--r--lua-utils.c 14
3 files changed, 10 insertions, 27 deletions
diff --git a/agg-plot/agg_platform_support_x11.cpp b/agg-plot/agg_platform_support_x11.cpp
index b3ad8475..3bb80d51 100644
--- a/agg-plot/agg_platform_support_x11.cpp
+++ b/agg-plot/agg_platform_support_x11.cpp
@@ -243,7 +243,7 @@ namespace agg
ev.xclient.data.l[3] = 0l;
ev.xclient.data.l[4] = 0l;
XSendEvent(m_display_alt, m_window, False, NoEventMask, &ev);
- XFlush(m_display_alt);
+ XSync(m_display_alt, False);
}
//------------------------------------------------------------------------
diff --git a/gsl-shell.c b/gsl-shell.c
index 3c2eea91..371f17bc 100644
--- a/gsl-shell.c
+++ b/gsl-shell.c
@@ -385,14 +385,20 @@ static void dotty (lua_State *L) {
}
}
+#ifdef AGG_PLOT_ENABLED
do_windows_unref (L);
+#endif
}
+#ifdef AGG_PLOT_ENABLED
object_index_apply_all (L, OBJECT_WINDOW, window_close);
- do {
- do_windows_unref (L);
- } while (object_index_count (L, OBJECT_WINDOW) > 0);
+ do
+ {
+ do_windows_unref (L);
+ }
+ while (object_index_count (L, OBJECT_WINDOW) > 0);
+#endif
lua_settop(L, 0); /* clear stack */
@@ -577,15 +583,6 @@ int main (int argc, char **argv) {
s.argv = argv;
status = lua_cpcall(L, &pmain, &s);
report(L, status);
-
- /* we clear the globals stack and make a full gc collect to avoid
- problem with finalizers execution order for plots and
- graphical objects. */
- mlua_table_clear (L, LUA_GLOBALSINDEX);
- lua_gc (L, LUA_GCCOLLECT, 0);
-#warning UGLY HACKS
- lua_gc (L, LUA_GCCOLLECT, 0);
- lua_gc (L, LUA_GCCOLLECT, 0);
lua_close(L);
pthread_mutex_destroy (gsl_shell_mutex);
diff --git a/lua-utils.c b/lua-utils.c
index e02ae98e..26e31ef4 100644
--- a/lua-utils.c
+++ b/lua-utils.c
@@ -224,17 +224,3 @@ mlua_fenv_get (lua_State *L, int index, int fenv_index)
lua_rawgeti (L, -1, fenv_index);
lua_remove (L, -2);
}
-
-void
-mlua_table_clear (lua_State *L, int index)
-{
- lua_pushnil (L); /* first key */
- while (lua_next(L, index) != 0)
- {
- lua_pop (L, 1);
- lua_pushvalue (L, -1);
- lua_pushnil (L);
- lua_rawset (L, index);
- }
-}
-
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月28日 11:54:34 +0000

AltStyle によって変換されたページ (->オリジナル) /