gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot')
-rw-r--r--agg-plot/lua-draw.cpp 5
-rw-r--r--agg-plot/lua-draw.h 14
-rw-r--r--agg-plot/lua-graph.cpp 4
-rw-r--r--agg-plot/lua-plot.cpp 1
-rw-r--r--agg-plot/window.cpp 1
5 files changed, 7 insertions, 18 deletions
diff --git a/agg-plot/lua-draw.cpp b/agg-plot/lua-draw.cpp
index ad2cd4c6..3bb53ac8 100644
--- a/agg-plot/lua-draw.cpp
+++ b/agg-plot/lua-draw.cpp
@@ -26,6 +26,7 @@ extern "C" {
}
#include "lua-draw.h"
+#include "lua-graph.h"
#include "text-shape.h"
#include "lua-cpp-utils.h"
#include "gs-types.h"
@@ -33,8 +34,6 @@ extern "C" {
#include "colors.h"
#include "sg_marker.h"
-pthread_mutex_t agg_mutex[1];
-
enum path_cmd_e {
CMD_ERROR = -1,
CMD_MOVE_TO = 0,
@@ -312,8 +311,6 @@ marker_free (lua_State *L)
void
draw_register (lua_State *L)
{
- pthread_mutex_init (agg_mutex, NULL);
-
luaL_newmetatable (L, GS_METATABLE(GS_DRAW_PATH));
luaL_register (L, NULL, agg_path_methods);
lua_pop (L, 1);
diff --git a/agg-plot/lua-draw.h b/agg-plot/lua-draw.h
index aa6ca2b7..a858b73c 100644
--- a/agg-plot/lua-draw.h
+++ b/agg-plot/lua-draw.h
@@ -1,11 +1,8 @@
#ifndef LUA_DRAW_H
#define LUA_DRAW_H
-
#include "defs.h"
-#include <pthread.h>
-
__BEGIN_DECLS
#include "lua.h"
__END_DECLS
@@ -26,17 +23,6 @@ extern draw::path* check_agg_path (lua_State *L, int index);
__BEGIN_DECLS
-extern pthread_mutex_t agg_mutex[1];
-
-#define AGG_LOCK() pthread_mutex_lock (agg_mutex);
-#define AGG_UNLOCK() pthread_mutex_unlock (agg_mutex);
-
-#define AGG_PROTECT(op) { \
- pthread_mutex_lock (agg_mutex); \
- op; \
- pthread_mutex_unlock (agg_mutex); \
- }
-
extern void draw_register (lua_State *L);
__END_DECLS
diff --git a/agg-plot/lua-graph.cpp b/agg-plot/lua-graph.cpp
index 609c9722..4be70d35 100644
--- a/agg-plot/lua-graph.cpp
+++ b/agg-plot/lua-graph.cpp
@@ -37,6 +37,8 @@ extern "C" {
static const struct luaL_Reg methods_dummy[] = {{NULL, NULL}};
+pthread_mutex_t agg_mutex[1];
+
void
graph_close_windows (lua_State *L)
{
@@ -46,6 +48,8 @@ graph_close_windows (lua_State *L)
void
register_graph (lua_State *L)
{
+ pthread_mutex_init (agg_mutex, NULL);
+
window_registry_prepare (L);
luaL_register (L, MLUA_GRAPHLIBNAME, methods_dummy);
diff --git a/agg-plot/lua-plot.cpp b/agg-plot/lua-plot.cpp
index 8ba21bbc..6af30eab 100644
--- a/agg-plot/lua-plot.cpp
+++ b/agg-plot/lua-plot.cpp
@@ -25,6 +25,7 @@ extern "C" {
#include "lua-plot.h"
#include "lua-plot-cpp.h"
+#include "lua-graph.h"
#include "lua-cpp-utils.h"
#include "bitmap-plot.h"
#include "window.h"
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp
index f48a725c..100aebf3 100644
--- a/agg-plot/window.cpp
+++ b/agg-plot/window.cpp
@@ -8,6 +8,7 @@ extern "C" {
#include "window-cpp.h"
#include "window_registry.h"
#include "lua-draw.h"
+#include "lua-graph.h"
#include "lua-cpp-utils.h"
#include "gs-types.h"
#include "colors.h"
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月17日 06:03:07 +0000

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