Skip to content

Commit 3d4816c

Browse files
committed
Switch Dola to Lua 5.5
1 parent b1186da commit 3d4816c

File tree

1 file changed

+117
-0
lines changed

1 file changed

+117
-0
lines changed
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
From 8a3e9185f870caecf58f1679edcfd8aa7e45c857 Mon Sep 17 00:00:00 2001
2+
From: Mikolaj Izdebski <mizdebsk@redhat.com>
3+
Date: Thu, 19 Feb 2026 17:10:17 +0100
4+
Subject: [PATCH 5/5] Switch to Lua 5.5
5+
6+
Forwarded: no
7+
---
8+
.../src/main/java/io/kojan/dola/rpm/RPM.java | 2 +-
9+
.../src/main/java/io/kojan/lujavrite/Lua.java | 16 ++++++++--------
10+
.../dola/generator/stub/RpmLujavriteTest.java | 2 +-
11+
3 files changed, 10 insertions(+), 10 deletions(-)
12+
13+
diff --git a/dola-bsx-api/src/main/java/io/kojan/dola/rpm/RPM.java b/dola-bsx-api/src/main/java/io/kojan/dola/rpm/RPM.java
14+
index bdea72b..f3f9f57 100644
15+
--- a/dola-bsx-api/src/main/java/io/kojan/dola/rpm/RPM.java
16+
+++ b/dola-bsx-api/src/main/java/io/kojan/dola/rpm/RPM.java
17+
@@ -26,7 +26,7 @@ public class RPM {
18+
// Load the Lujavrite native shared library necessary to interface with Lua.
19+
// This library provides native support for the Lua-Java bridge.
20+
static {
21+
- System.load("/usr/lib64/lua/5.4/lujavrite.so");
22+
+ System.load("/usr/lib64/lua/5.5/lujavrite.so");
23+
}
24+
25+
/**
26+
diff --git a/dola-bsx-api/src/main/java/io/kojan/lujavrite/Lua.java b/dola-bsx-api/src/main/java/io/kojan/lujavrite/Lua.java
27+
index 8218773..438e446 100644
28+
--- a/dola-bsx-api/src/main/java/io/kojan/lujavrite/Lua.java
29+
+++ b/dola-bsx-api/src/main/java/io/kojan/lujavrite/Lua.java
30+
@@ -25,7 +25,7 @@ package io.kojan.lujavrite;
31+
* such a context results in undefined behavior.
32+
*
33+
* <p>For more detailed documentation of Lua C API, see the <a
34+
- * href="https://www.lua.org/manual/5.4/manual.html">Lua Reference Manual</a>.
35+
+ * href="https://www.lua.org/manual/5.5/manual.html">Lua Reference Manual</a>.
36+
*
37+
* <p>This trivial Java class is maintained as part of Lujavrite project, but it is expected to be
38+
* source-bundled by projects depending on the Java->Lua calling functionality of LuJavRite. The
39+
@@ -40,7 +40,7 @@ public class Lua {
40+
/**
41+
* Pushes the global variable with the given name onto the Lua stack.
42+
*
43+
- * @see <a href="https://www.lua.org/manual/5.4/manual.html#lua_getglobal">lua_getglobal</a>
44+
+ * @see <a href="https://www.lua.org/manual/5.5/manual.html#lua_getglobal">lua_getglobal</a>
45+
* method documentation in Lua Reference Manual
46+
* @param name the name of the global variable to retrieve
47+
* @return the type of the value pushed onto the stack
48+
@@ -50,7 +50,7 @@ public class Lua {
49+
/**
50+
* Pushes onto the stack the value of a field from a table at the given index.
51+
*
52+
- * @see <a href=https://www.lua.org/manual/5.4/manual.html#lua_getfield>lua_getfield</a> method
53+
+ * @see <a href=https://www.lua.org/manual/5.5/manual.html#lua_getfield>lua_getfield</a> method
54+
* documentation in Lua Reference Manual
55+
* @param index the stack index of the table
56+
* @param name the name of the field to retrieve
57+
@@ -61,7 +61,7 @@ public class Lua {
58+
/**
59+
* Pushes a Java string onto the Lua stack as a Lua string.
60+
*
61+
- * @see <a href=https://www.lua.org/manual/5.4/manual.html#lua_pushstring>lua_pushstring</a>
62+
+ * @see <a href=https://www.lua.org/manual/5.5/manual.html#lua_pushstring>lua_pushstring</a>
63+
* method documentation in Lua Reference Manual
64+
* @param string the string to push onto the stack
65+
*/
66+
@@ -70,7 +70,7 @@ public class Lua {
67+
/**
68+
* Calls a Lua function with the specified number of arguments and expected results.
69+
*
70+
- * @see <a href=https://www.lua.org/manual/5.4/manual.html#lua_pcall>lua_pcall</a> method
71+
+ * @see <a href=https://www.lua.org/manual/5.5/manual.html#lua_pcall>lua_pcall</a> method
72+
* documentation in Lua Reference Manual
73+
* @param nargs the number of arguments to pass to the function
74+
* @param nresults the number of expected return values
75+
@@ -82,7 +82,7 @@ public class Lua {
76+
/**
77+
* Converts the Lua value at the given stack index to a Java string.
78+
*
79+
- * @see <a href=https://www.lua.org/manual/5.4/manual.html#lua_tostring>lua_tostring</a> method
80+
+ * @see <a href=https://www.lua.org/manual/5.5/manual.html#lua_tostring>lua_tostring</a> method
81+
* documentation in Lua Reference Manual
82+
* @param index the index of the value on the stack
83+
* @return the string representation of the Lua value
84+
@@ -92,7 +92,7 @@ public class Lua {
85+
/**
86+
* Removes the top {@code n} elements from the Lua stack.
87+
*
88+
- * @see <a href=https://www.lua.org/manual/5.4/manual.html#lua_pop>lua_pop</a> method
89+
+ * @see <a href=https://www.lua.org/manual/5.5/manual.html#lua_pop>lua_pop</a> method
90+
* documentation in Lua Reference Manual
91+
* @param n the number of elements to pop
92+
* @return the new top index of the stack
93+
@@ -103,7 +103,7 @@ public class Lua {
94+
* Removes the element at the specified index from the Lua stack, shifting elements above it
95+
* down.
96+
*
97+
- * @see <a href=https://www.lua.org/manual/5.4/manual.html#lua_remove>lua_remove</a> method
98+
+ * @see <a href=https://www.lua.org/manual/5.5/manual.html#lua_remove>lua_remove</a> method
99+
* documentation in Lua Reference Manual
100+
* @param index the index of the element to remove
101+
* @return the new top index of the stack
102+
diff --git a/dola-generator/src/test/java/io/kojan/dola/generator/stub/RpmLujavriteTest.java b/dola-generator/src/test/java/io/kojan/dola/generator/stub/RpmLujavriteTest.java
103+
index 77ee8be..368f914 100644
104+
--- a/dola-generator/src/test/java/io/kojan/dola/generator/stub/RpmLujavriteTest.java
105+
+++ b/dola-generator/src/test/java/io/kojan/dola/generator/stub/RpmLujavriteTest.java
106+
@@ -39,7 +39,7 @@ class RpmLujavriteTest {
107+
108+
@BeforeAll
109+
static void setUpClass() {
110+
- System.load("/usr/lib64/lua/5.4/lujavrite.so");
111+
+ System.load("/usr/lib64/lua/5.5/lujavrite.so");
112+
}
113+
114+
@Test
115+
--
116+
2.51.0
117+

0 commit comments

Comments
 (0)