gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年04月22日 22:55:29 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年04月22日 22:55:29 +0200
commit23dd1088cc608f470c9fdcf7e8f353e9aa96b4ce (patch)
tree72b40ba0d34ba7524a88afbe4ede7172f16a7fbc
parent5ac82640e156396074e9884992e972ed74e521f2 (diff)
downloadgsl-shell-23dd1088cc608f470c9fdcf7e8f353e9aa96b4ce.tar.gz
Minor code simplification in window_registry
Diffstat
-rw-r--r--agg-plot/window_registry.cpp 7
1 files changed, 2 insertions, 5 deletions
diff --git a/agg-plot/window_registry.cpp b/agg-plot/window_registry.cpp
index 0ebfa499..c09539bc 100644
--- a/agg-plot/window_registry.cpp
+++ b/agg-plot/window_registry.cpp
@@ -18,14 +18,11 @@ window_registry_prepare (lua_State *L)
int
window_index_add(lua_State *L, int index)
{
- int n;
-
- if (index < 0)
- index = lua_gettop (L) - (index+1);
+ INDEX_SET_ABS(L, index);
lua_getfield (L, LUA_REGISTRYINDEX, registry_tname);
- n = lua_objlen (L, -1);
+ int n = lua_objlen (L, -1);
lua_pushvalue (L, index);
lua_rawseti (L, -2, n+1);
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月16日 09:14:10 +0000

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