gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/agg-parse-trans.cpp
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2010年10月21日 17:54:30 +0200
committerfrancesco-ST <francesco.abbate@st.com>2010年10月21日 17:54:30 +0200
commitf2a6a9203f69006b9aee94f96dc19d638047f67a (patch)
treeab19e56a5695a4e2efcb52c6c7e9837abacbc098 /agg-plot/agg-parse-trans.cpp
parentc2531ad7f2dc7bfae6357bacc28e7f6a3591d48d (diff)
downloadgsl-shell-f2a6a9203f69006b9aee94f96dc19d638047f67a.tar.gz
changed scalable/drawable object base class to boxed pointers for Lua compat
This change is meant to avoid to access object already deallocated by Lua.
Diffstat (limited to 'agg-plot/agg-parse-trans.cpp')
-rw-r--r--agg-plot/agg-parse-trans.cpp 6
1 files changed, 4 insertions, 2 deletions
diff --git a/agg-plot/agg-parse-trans.cpp b/agg-plot/agg-parse-trans.cpp
index 147aa8a3..d7f11d17 100644
--- a/agg-plot/agg-parse-trans.cpp
+++ b/agg-plot/agg-parse-trans.cpp
@@ -305,7 +305,8 @@ parse_graph_args (lua_State *L, agg::rgba8& color)
if (gs_is_userdata (L, 2, GS_DRAW_SCALABLE))
{
- scalable *s = (scalable *) lua_touserdata (L, 2);
+ vertex_source *vs = (vertex_source *) lua_touserdata (L, 2);
+ scalable *s = new boxed_scalable(vs);
if (narg > 4)
{
@@ -323,7 +324,8 @@ parse_graph_args (lua_State *L, agg::rgba8& color)
}
else if (gs_is_userdata (L, 2, GS_DRAW_DRAWABLE))
{
- w = (drawable *) lua_touserdata (L, 2);
+ vertex_source *vs = (vertex_source *) lua_touserdata (L, 2);
+ w = new boxed_drawable(vs);
}
else
{
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月28日 21:07:55 +0000

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