-rw-r--r-- | agg-plot/bitmap-plot.cpp | 2 | ||||
-rw-r--r-- | defs.h | 4 | ||||
-rw-r--r-- | lua-utils.c | 3 |
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; @@ -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 * |