Removed GC hack to disable ephemeron tables. - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/window.cpp
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2011年02月03日 16:08:46 +0100
committerfrancesco-ST <francesco.abbate@st.com>2011年02月03日 16:08:46 +0100
commitd8e80205ac800994ae3b7360a299841f20be3371 (patch)
tree63dfa87ba9c245f787d10247c98e2ab6f355411f /agg-plot/window.cpp
parentf9f49265522fe933fd6ca726ecd23bf33c9aae09 (diff)
downloadgsl-shell-d8e80205ac800994ae3b7360a299841f20be3371.tar.gz
Removed GC hack to disable ephemeron tables.
The corresponding work-around to "protected" windows was also removed.
Diffstat (limited to 'agg-plot/window.cpp')
-rw-r--r--agg-plot/window.cpp 15
1 files changed, 3 insertions, 12 deletions
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp
index 11120575..cf02b9e0 100644
--- a/agg-plot/window.cpp
+++ b/agg-plot/window.cpp
@@ -370,15 +370,9 @@ typedef void (window::*window_slot_method_type)(int slot_id);
int window_generic_oper (lua_State *L, window_slot_method_type method)
{
- window_boxed *win = object_check<window_boxed>(L, 1, GS_WINDOW);
+ window *win = object_check<window>(L, 1, GS_WINDOW);
int slot_id = luaL_checkinteger (L, 2);
- // we check to be sure that the window was not garbage collected
- // by Lua. In this case the destructor was called but the momory
- // itself is not disposed. Since the is_alive method is non-virtual
- // that shoud be always fine.
- if (! win->is_alive()) return 0;
-
win->lock();
if (win->status == canvas_window::running)
{
@@ -394,12 +388,9 @@ int window_generic_oper_ext (lua_State *L,
void (window::*method)(int, param_type),
param_type param)
{
- window_boxed *win = object_check<window_boxed>(L, 1, GS_WINDOW);
+ window *win = object_check<window>(L, 1, GS_WINDOW);
int slot_id = luaL_checkinteger (L, 2);
- // see comment is the function window_generic_oper
- if (! win->is_alive()) return 0;
-
win->lock();
if (win->status == canvas_window::running)
{
@@ -439,7 +430,7 @@ void window::start (lua_State *L, gslshell::ret_status& st)
int
window_new (lua_State *L)
{
- window_boxed *win = push_new_object<window_boxed>(L, GS_WINDOW, colors::white);
+ window *win = push_new_object<window>(L, GS_WINDOW, colors::white);
const char *spec = lua_tostring (L, 1);
gslshell::ret_status st;
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月16日 12:58:54 +0000

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