gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--agg-plot/bitmap-plot.cpp 2
-rw-r--r--defs.h 4
-rw-r--r--lua-utils.c 3
3 files changed, 6 insertions, 3 deletions
diff --git a/agg-plot/bitmap-plot.cpp b/agg-plot/bitmap-plot.cpp
index 5b4a5091..807727a1 100644
--- a/agg-plot/bitmap-plot.cpp
+++ b/agg-plot/bitmap-plot.cpp
@@ -53,7 +53,7 @@ bitmap_save_image (lua_State *L)
}
catch (std::bad_alloc&)
{
- return luaL_error (L, "out of virtual memory");
+ return luaL_error (L, OUT_OF_MEMORY_MSG);
}
return 0;
diff --git a/defs.h b/defs.h
index 68697cc5..126eb05d 100644
--- a/defs.h
+++ b/defs.h
@@ -45,7 +45,7 @@ typedef int bool;
#include <stdbool.h>
#endif
-#define OUT_OF_MEMORY_MSG "out of memory"
-#define INVALID_INDEX_MSG "index out of limits"
+extern char const * const OUT_OF_MEMORY_MSG;
+extern char const * const INVALID_INDEX_MSG;
#endif
diff --git a/lua-utils.c b/lua-utils.c
index 26e31ef4..03193e5a 100644
--- a/lua-utils.c
+++ b/lua-utils.c
@@ -25,6 +25,9 @@
#include "lua-utils.h"
#include "gs-types.h"
+char const * const OUT_OF_MEMORY_MSG = "out of memory";
+char const * const INVALID_INDEX_MSG = "index out of limits";
+
static char const * const CACHE_FIELD_NAME = "__cache";
const struct luaL_Reg *
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月30日 08:18:45 +0000

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