forked from pool/libguestfs
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=163
30 lines
945 B
Diff
30 lines
945 B
Diff
From 7331665b7c0009e77e1f5004f427b4d9b2cf4940 Mon Sep 17 00:00:00 2001
|
|
From: Olaf Hering <olaf@aepfle.de>
|
|
Date: Fri, 23 Nov 2012 20:10:00 +0100
|
|
Subject: [PATCH] lua: fix build error due to LUA_GLOBALSINDEX usage
|
|
|
|
lua 5.2 changed API, LUA_GLOBALSINDEX is no longer available.
|
|
http://www.lua.org/manual/5.2/manual.html#8.3
|
|
|
|
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
---
|
|
generator/lua.ml | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/generator/lua.ml b/generator/lua.ml
|
|
index 88748ae..7461cbd 100644
|
|
--- a/generator/lua.ml
|
|
+++ b/generator/lua.ml
|
|
@@ -723,7 +723,7 @@ push_int64_array (lua_State *L, const int64_t *array, size_t len)
|
|
static void
|
|
print_any (lua_State *L, int index, FILE *out)
|
|
{
|
|
- lua_getfield (L, LUA_GLOBALSINDEX, \"tostring\");
|
|
+ lua_getglobal(L, \"tostring\");
|
|
lua_pushvalue (L, index >= 0 ? index : index-1);
|
|
lua_call (L, 1, 1);
|
|
fprintf (out, \"%%s\", luaL_checkstring (L, -1));
|
|
--
|
|
1.8.0
|
|
|