Merge branch 'master' into fox-gui - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/lua-plot.cpp
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年08月26日 16:12:53 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年08月26日 16:12:53 +0200
commitdf7bd02dfe1bdc3209aeed2a98408f392af7a557 (patch)
tree3cfae1a0941f4bbf73b176d98ee9698941758134 /agg-plot/lua-plot.cpp
parent11561b1b2f367e38c7e0a89297341ac685d87272 (diff)
parentf5d84b9531cd9a7e9bb5b920e696bc5be1626de7 (diff)
downloadgsl-shell-df7bd02dfe1bdc3209aeed2a98408f392af7a557.tar.gz
Merge branch 'master' into fox-gui
Diffstat (limited to 'agg-plot/lua-plot.cpp')
-rw-r--r--agg-plot/lua-plot.cpp 21
1 files changed, 2 insertions, 19 deletions
diff --git a/agg-plot/lua-plot.cpp b/agg-plot/lua-plot.cpp
index 9f6ce209..6b1d9254 100644
--- a/agg-plot/lua-plot.cpp
+++ b/agg-plot/lua-plot.cpp
@@ -30,7 +30,7 @@ extern "C" {
#include "lua-cpp-utils.h"
#include "bitmap-plot.h"
#include "gs-types.h"
-#include "lua-utils.h"
+#include "lua-properties.h"
#include "window_registry.h"
#include "lua-cpp-utils.h"
#include "lua-draw.h"
@@ -46,8 +46,6 @@ static int plot_add (lua_State *L);
static int plot_update (lua_State *L);
static int plot_flush (lua_State *L);
static int plot_add_line (lua_State *L);
-static int plot_index (lua_State *L);
-static int plot_newindex (lua_State *L);
static int plot_free (lua_State *L);
static int plot_show (lua_State *L);
static int plot_title_set (lua_State *L);
@@ -92,8 +90,6 @@ static const struct luaL_Reg plot_functions[] = {
};
static const struct luaL_Reg plot_metatable[] = {
- {"__index", plot_index },
- {"__newindex", plot_newindex },
{"__gc", plot_free },
{NULL, NULL}
};
@@ -471,20 +467,6 @@ plot_units_get (lua_State *L)
return plot_bool_property_get(L, &sg_plot::use_units);
}
-int
-plot_index (lua_State *L)
-{
- return mlua_index_with_properties (L,
- plot_properties_get,
- plot_methods, false);
-}
-
-int
-plot_newindex (lua_State *L)
-{
- return mlua_newindex_with_properties (L, plot_properties_set);
-}
-
void
plot_update_raw (lua_State *L, sg_plot *p, int plot_index)
{
@@ -782,6 +764,7 @@ plot_register (lua_State *L)
{
/* plot declaration */
luaL_newmetatable (L, GS_METATABLE(GS_PLOT));
+ register_properties_index(L, plot_methods, plot_properties_get, plot_properties_set);
luaL_register (L, NULL, plot_metatable);
lua_pop (L, 1);
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月18日 00:27:10 +0000

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