author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年05月02日 23:10:35 +0200 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2012年05月02日 23:10:35 +0200 |
commit | cb2999cca79d4ef9a5805e6c5ac8f34437960291 (patch) | |
tree | c26a24fd2a4b0368d50d6c63205ec3f6539f5bfc /agg-plot/window.cpp | |
parent | 391828000ed4134bdbb791fa1ebe516c7e3ddc6f (diff) | |
download | gsl-shell-cb2999cca79d4ef9a5805e6c5ac8f34437960291.tar.gz |
-rw-r--r-- | agg-plot/window.cpp | 9 |
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; |