added object index to manage both plot and windows - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/canvas-window.cpp
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2010年08月12日 11:51:29 +0200
committerfrancesco-ST <francesco.abbate@st.com>2010年08月12日 11:51:29 +0200
commitb55a4cf705a06ef2c9995da4d2784e8d5969ee3e (patch)
treecee3a5404dee2d8a74fb60c0d5daad1985f8b402 /agg-plot/canvas-window.cpp
parent9529186aacd0d02d6b609cec247ab6b4610fd342 (diff)
downloadgsl-shell-b55a4cf705a06ef2c9995da4d2784e8d5969ee3e.tar.gz
added object index to manage both plot and windows
Now both plot and windows gets an id which is used to manage userdata cross-references.
Diffstat (limited to 'agg-plot/canvas-window.cpp')
-rw-r--r--agg-plot/canvas-window.cpp 6
1 files changed, 3 insertions, 3 deletions
diff --git a/agg-plot/canvas-window.cpp b/agg-plot/canvas-window.cpp
index 9302b46e..a997c4b7 100644
--- a/agg-plot/canvas-window.cpp
+++ b/agg-plot/canvas-window.cpp
@@ -31,7 +31,7 @@ extern "C" {
#include "agg-parse-trans.h"
#include "lua-cpp-utils.h"
#include "lua-utils.h"
-#include "window-refs.h"
+#include "object-index.h"
#include "lua-draw.h"
#include "gs-types.h"
#include "colors.h"
@@ -109,7 +109,7 @@ canvas_window::start_new_thread (lua_State *L)
if (status != not_ready && status != closed)
return;
- this->id = window_ref_add (L, lua_gettop (L));
+ this->id = object_index_add (L, OBJECT_WINDOW, -1);
pthread_attr_t attr[1];
pthread_t win_thread[1];
@@ -121,7 +121,7 @@ canvas_window::start_new_thread (lua_State *L)
if (pthread_create(win_thread, attr, canvas_thread_function, (void*) this))
{
- window_ref_remove (L, this->id);
+ object_index_remove (L, OBJECT_WINDOW, this->id);
pthread_attr_destroy (attr);
this->status = canvas_window::error;
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月16日 13:11:21 +0000

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