Use global variables for gsl_shell_state and FXApp - 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 Abbate <francesco.bbt@gmail.com>2012年05月02日 23:10:35 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年05月02日 23:10:35 +0200
commitcb2999cca79d4ef9a5805e6c5ac8f34437960291 (patch)
treec26a24fd2a4b0368d50d6c63205ec3f6539f5bfc /agg-plot/window.cpp
parent391828000ed4134bdbb791fa1ebe516c7e3ddc6f (diff)
downloadgsl-shell-cb2999cca79d4ef9a5805e6c5ac8f34437960291.tar.gz
Use global variables for gsl_shell_state and FXApp
Diffstat (limited to 'agg-plot/window.cpp')
-rw-r--r--agg-plot/window.cpp 9
1 files changed, 1 insertions, 8 deletions
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp
index 100aebf3..5b0e4643 100644
--- a/agg-plot/window.cpp
+++ b/agg-plot/window.cpp
@@ -424,14 +424,7 @@ void window::start (lua_State *L, gslshell::ret_status& st)
int
window_new (lua_State *L)
{
- lua_getfield(L, LUA_REGISTRYINDEX, "__gsl_shell");
- gsl_shell_state* gs = (gsl_shell_state*) lua_touserdata(L, -1);
- lua_pop(L, 1);
-
- if (unlikely(gs == NULL))
- return luaL_error(L, "cannot create window: not a GSL Shell state");
-
- window *win = push_new_object<window>(L, GS_WINDOW, gs);
+ window *win = push_new_object<window>(L, GS_WINDOW, global_state);
const char *spec = lua_tostring (L, 1);
gslshell::ret_status st;
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月13日 09:08:51 +0000

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