Python-Lua-Helper 1.2.0__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/PKG-INFO +1 -1
  2. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/hatch_build.py +1 -1
  3. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/lua/build-mingw.sh +1 -1
  4. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/lua/build.patch +16 -17
  5. python_lua_helper-1.4.0/lua/lua-5.5.0.sha256 +1 -0
  6. python_lua_helper-1.4.0/lua/lua-windows-i686 +0 -0
  7. python_lua_helper-1.4.0/lua/lua-windows-x86_64 +0 -0
  8. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/python_lua_helper/loader.lua +29 -8
  9. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/python_lua_helper/py_lua_helper.py +119 -108
  10. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/python_lua_helper/test_example/example.cfg.lua +1 -1
  11. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/python_lua_helper/test_example.py +1 -1
  12. python_lua_helper-1.2.0/lua/lua-5.4.8.sha256 +0 -1
  13. python_lua_helper-1.2.0/lua/lua-windows-i686 +0 -0
  14. python_lua_helper-1.2.0/lua/lua-windows-x86_64 +0 -0
  15. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/.gitignore +0 -0
  16. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/LICENSE +0 -0
  17. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/pyproject.toml +0 -0
  18. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/python_lua_helper/__init__.py +0 -0
  19. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/python_lua_helper/test_example/example.post.lua +0 -0
  20. {python_lua_helper-1.2.0 → python_lua_helper-1.4.0}/python_lua_helper/test_example/example.pre.lua +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Python-Lua-Helper
3
- Version: 1.2.0
3
+ Version: 1.4.0
4
4
  Summary: Lua configuration system for your Python projects.
5
5
  Project-URL: Repository, https://github.com/DarkCaster/Python-Lua-Helper.git
6
6
  Author-email: DarkCaster <dark.caster@outlook.com>
@@ -57,7 +57,7 @@ class CustomBuildHook(BuildHookInterface):
57
57
  arch = platform.machine().lower()
58
58
  print(f"OS: {current_os}, arch: {arch}")
59
59
  # Lua build defines
60
- lua_version = "5.4.8"
60
+ lua_version = "5.5.0"
61
61
  lua_src = f"lua-{lua_version}.tar.gz"
62
62
  lua_checksum = f"lua-{lua_version}.sha256"
63
63
  lua_patch = "build.patch"
@@ -8,7 +8,7 @@ arch="$2"
8
8
 
9
9
  script_dir="$(cd "$(dirname "$0")" && pwd)"
10
10
 
11
- lua_version="5.4.8"
11
+ lua_version="5.5.0"
12
12
  lua_src="lua-$lua_version.tar.gz"
13
13
  lua_checksum="lua-$lua_version.sha256"
14
14
 
@@ -1,7 +1,7 @@
1
- diff -uprN lua-5.4.8.old/src/luaconf.h lua-5.4.8/src/luaconf.h
2
- --- lua-5.4.8.old/src/luaconf.h 2025-05-22 00:09:16.000000000 +0300
3
- +++ lua-5.4.8/src/luaconf.h 2025-11-15 14:39:42.772620831 +0300
4
- @@ -53,26 +53,22 @@
1
+ diff -uprN lua-5.5.0.old/src/luaconf.h lua-5.5.0/src/luaconf.h
2
+ --- lua-5.5.0.old/src/luaconf.h 2025-12-15 13:44:40.000000000 +0300
3
+ +++ lua-5.5.0/src/luaconf.h 2026-02-08 02:46:07.116399878 +0300
4
+ @@ -53,7 +53,6 @@
5
5
 
6
6
 
7
7
  #if defined(LUA_USE_WINDOWS)
@@ -9,16 +9,19 @@ diff -uprN lua-5.4.8.old/src/luaconf.h lua-5.4.8/src/luaconf.h
9
9
  #define LUA_USE_C89 /* broadly, Windows is C89 */
10
10
  #endif
11
11
 
12
-
12
+ @@ -69,21 +68,18 @@
13
+ */
13
14
  #if defined(LUA_USE_LINUX)
14
15
  #define LUA_USE_POSIX
15
16
  -#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
17
+ #define LUA_READLINELIB "libreadline.so"
16
18
  #endif
17
19
 
18
20
 
19
21
  #if defined(LUA_USE_MACOSX)
20
22
  #define LUA_USE_POSIX
21
- -#define LUA_USE_DLOPEN /* MacOS does not need -ldl */
23
+ -#define LUA_USE_DLOPEN /* macOS does not need -ldl */
24
+ #define LUA_READLINELIB "libedit.dylib"
22
25
  #endif
23
26
 
24
27
 
@@ -28,25 +31,21 @@ diff -uprN lua-5.4.8.old/src/luaconf.h lua-5.4.8/src/luaconf.h
28
31
  #endif
29
32
 
30
33
 
31
- diff -uprN lua-5.4.8.old/src/Makefile lua-5.4.8/src/Makefile
32
- --- lua-5.4.8.old/src/Makefile 2023-02-03 13:43:14.000000000 +0300
33
- +++ lua-5.4.8/src/Makefile 2025-11-15 17:18:54.952610183 +0300
34
- @@ -123,18 +123,17 @@ ios:
35
- Linux linux: linux-noreadline
34
+ diff -uprN lua-5.5.0.old/src/Makefile lua-5.5.0/src/Makefile
35
+ --- lua-5.5.0.old/src/Makefile 2025-07-07 03:19:14.000000000 +0300
36
+ +++ lua-5.5.0/src/Makefile 2026-02-08 02:51:17.686297782 +0300
37
+ @@ -121,15 +121,14 @@ ios:
38
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_IOS"
36
39
 
37
- linux-noreadline:
40
+ Linux linux:
38
41
  - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl"
39
42
  + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS=""
40
43
 
41
- linux-readline:
42
- - $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -ldl -lreadline"
43
- + $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -lreadline"
44
-
45
44
  Darwin macos macosx:
46
45
  $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline"
47
46
 
48
47
  mingw:
49
- - $(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" \
48
+ - $(MAKE) "LUA_A=lua55.dll" "LUA_T=lua.exe" \
50
49
  - "AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
51
50
  - "SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
52
51
  + $(MAKE) "LUA_T=lua.exe" \
@@ -0,0 +1 @@
1
+ 57ccc32bbbd005cab75bcc52444052535af691789dba2b9016d5c50640d68b3d *lua-5.5.0.tar.gz
@@ -242,19 +242,36 @@ if loader.postexec ~= nil then
242
242
  dofile(loader.postexec)
243
243
  end
244
244
 
245
- loader.dataout=loader.tmpdir..loader.pathseparator.."data"..loader.pathseparator
246
- loader.metaout=loader.tmpdir..loader.pathseparator.."meta"..loader.pathseparator
245
+ loader.dataout=loader.tmpdir..loader.pathseparator.."data.tmp"
246
+ loader.metaout=loader.tmpdir..loader.pathseparator.."meta.tmp"
247
+ loader.indexout=loader.tmpdir..loader.pathseparator.."index.tmp"
248
+
249
+ target_data = assert(io.open(loader.dataout, "w"))
250
+ target_meta = assert(io.open(loader.metaout, "w"))
251
+ target_index = assert(io.open(loader.indexout, "w"))
252
+
253
+ target_data:write("start")
254
+ target_data:write("\255".."\000")
255
+
256
+ target_meta:write("start")
257
+ target_meta:write("\255".."\000")
258
+
259
+ target_index:write("start")
260
+ target_index:write("\255".."\000")
247
261
 
248
262
  function loader_data_export(name,value)
249
- local target = assert(io.open(loader.dataout..name, "w"))
250
- target:write(string.format("%s",tostring(value)))
251
- target:close()
263
+ -- write value to target_data
264
+ target_data:write(string.format("%s",tostring(value)))
265
+ target_data:write("\255".."\000")
252
266
  end
253
267
 
254
268
  function loader_meta_export(name,value)
255
- local target = assert(io.open(loader.metaout..name, "w"))
256
- target:write(string.format("%s",tostring(value)))
257
- target:close()
269
+ -- write name to target_index
270
+ target_index:write(name)
271
+ target_index:write("\255".."\000")
272
+ -- write value to target_meta
273
+ target_meta:write(string.format("%s",tostring(value)))
274
+ target_meta:write("\255".."\000")
258
275
  end
259
276
 
260
277
  function loader_node_export(name,node)
@@ -309,3 +326,7 @@ for index,value in ipairs(loader.export) do
309
326
  loader_node_export(value,target)
310
327
  end
311
328
  end
329
+
330
+ target_index:close()
331
+ target_meta:close()
332
+ target_data:close()
@@ -45,53 +45,47 @@ class PyLuaHelper:
45
45
  lua_binary: Path to specific Lua binary (optional, will be auto-detected if not provided)
46
46
  lua_args: Additional arguments to pass to Lua script (will be placed to loader.args)
47
47
  """
48
- self.lua_config_script = os.path.abspath(lua_config_script)
49
- self.export_vars = export_vars or []
50
- self.pre_script = pre_script
51
- self.post_script = post_script
52
- self.extra_strings = extra_strings or []
53
- self.work_dir = work_dir or os.path.dirname(self.lua_config_script)
54
- self.temp_dir = temp_dir
55
- self.min_lua_version = min_lua_version or "5.1.0"
56
- self.max_lua_version = max_lua_version or "5.4.999"
57
- self.lua_binary = lua_binary
58
- self.lua_args = lua_args or []
59
- self.lua_actual_version = None
60
-
48
+ self._lua_config_script = os.path.abspath(lua_config_script)
49
+ self._export_vars = export_vars or []
50
+ self._pre_script = pre_script
51
+ self._post_script = post_script
52
+ self._extra_strings = extra_strings or []
53
+ self._work_dir = work_dir or os.path.dirname(self._lua_config_script)
54
+ self._temp_dir = temp_dir
55
+ self._min_lua_version = min_lua_version or "5.1.0"
56
+ self._max_lua_version = max_lua_version or "5.5.999"
57
+ self._lua_binary = lua_binary
58
+ self._lua_args = lua_args or []
59
+ self._lua_actual_version = None
61
60
  # Validate required files exist
62
- if not os.path.exists(self.lua_config_script):
61
+ if not os.path.exists(self._lua_config_script):
63
62
  raise FileNotFoundError(
64
- f"Main config file not found: {self.lua_config_script}"
63
+ f"Main config file not found: {self._lua_config_script}"
65
64
  )
66
-
67
65
  # Initialize internal state
68
66
  self._variables: Dict[str, str] = {}
69
67
  self._metadata: Dict[str, str] = {}
70
- self._export_list: List[str] = []
71
-
72
68
  # Initialize temporary directory
73
69
  self._setup_temp_dir()
74
-
75
- # Detect Lua binary
76
- if not self.lua_binary:
77
- self._detect_lua_binary()
78
-
79
- # Execute the Lua loader
80
- self._run_lua_loader()
81
-
82
- # Parse results
83
- self._parse_results()
84
-
85
- # Clean up temp directory
86
- self._cleanup()
70
+ try:
71
+ # Detect Lua binary
72
+ if not self._lua_binary:
73
+ self._detect_lua_binary()
74
+ # Execute the Lua loader
75
+ self._run_lua_loader()
76
+ # Parse results
77
+ self._parse_results()
78
+ finally:
79
+ # Clean up temp directory
80
+ self._cleanup()
87
81
 
88
82
  def _setup_temp_dir(self):
89
83
  """Setup temporary directory for storing exported variables."""
90
- if self.temp_dir:
91
- if not os.path.exists(self.temp_dir):
92
- raise ValueError(f"Temp directory does not exist: {self.temp_dir}")
93
- self.temp_dir = os.path.abspath(self.temp_dir)
94
- self.temp_dir = tempfile.mkdtemp(prefix="lua-helper-", dir=self.temp_dir)
84
+ if self._temp_dir:
85
+ if not os.path.exists(self._temp_dir):
86
+ raise ValueError(f"Temp directory does not exist: {self._temp_dir}")
87
+ self._temp_dir = os.path.abspath(self._temp_dir)
88
+ self._temp_dir = tempfile.mkdtemp(prefix="lua-helper-", dir=self._temp_dir)
95
89
  else:
96
90
  # Detect temp directory if not provided, platform dependent
97
91
  if os.name == "nt": # Windows
@@ -109,7 +103,7 @@ class PyLuaHelper:
109
103
  for base_dir in temp_dirs:
110
104
  try:
111
105
  # Try to create temp directory in this location
112
- self.temp_dir = tempfile.mkdtemp(
106
+ self._temp_dir = tempfile.mkdtemp(
113
107
  prefix="lua-helper-", dir=base_dir
114
108
  )
115
109
  break
@@ -141,34 +135,33 @@ class PyLuaHelper:
141
135
  text=True,
142
136
  )
143
137
  if result.returncode == 0:
144
- self.temp_dir = target
138
+ self._temp_dir = target
145
139
  break
146
140
  except Exception:
147
141
  continue
148
- if not self.temp_dir:
149
- self.temp_dir = "/tmp"
142
+ if not self._temp_dir:
143
+ self._temp_dir = "/tmp"
150
144
  # Create unique temp directory
151
- self.temp_dir = tempfile.mkdtemp(
152
- prefix="lua-helper-", dir=self.temp_dir
145
+ self._temp_dir = tempfile.mkdtemp(
146
+ prefix="lua-helper-", dir=self._temp_dir
153
147
  )
154
- # Create data storage directories in selected temp dir
155
- self.meta_dir = os.path.join(self.temp_dir, "meta")
156
- self.data_dir = os.path.join(self.temp_dir, "data")
157
- os.makedirs(self.meta_dir)
158
- os.makedirs(self.data_dir)
148
+ # Define temp files for data exchange
149
+ self._meta_file = os.path.join(self._temp_dir, "meta.tmp")
150
+ self._data_file = os.path.join(self._temp_dir, "data.tmp")
151
+ self._index_file = os.path.join(self._temp_dir, "index.tmp")
159
152
 
160
153
  def _detect_lua_binary(self):
161
154
  """Detect appropriate Lua binary based on version requirements."""
162
- if self.lua_binary:
155
+ if self._lua_binary:
163
156
  # Use explicitly provided binary
164
- if not os.path.exists(self.lua_binary):
165
- raise FileNotFoundError(f"Lua binary not found: {self.lua_binary}")
166
- if self._validate_lua_version(self.lua_binary):
167
- self.lua_binary = os.path.abspath(self.lua_binary)
157
+ if not os.path.exists(self._lua_binary):
158
+ raise FileNotFoundError(f"Lua binary not found: {self._lua_binary}")
159
+ if self._validate_lua_version(self._lua_binary):
160
+ self._lua_binary = os.path.abspath(self._lua_binary)
168
161
  return
169
162
  else:
170
163
  raise ValueError(
171
- f"Lua binary does not meet version requirements: {self.lua_binary}"
164
+ f"Lua binary does not meet version requirements: {self._lua_binary}"
172
165
  )
173
166
  # Probe for available Lua binaries
174
167
  lua_hints = [
@@ -190,7 +183,7 @@ class PyLuaHelper:
190
183
  try:
191
184
  lua_path = shutil.which(f"{hint}{bin_suffix}")
192
185
  if lua_path and self._validate_lua_version(lua_path):
193
- self.lua_binary = os.path.abspath(lua_path)
186
+ self._lua_binary = os.path.abspath(lua_path)
194
187
  return
195
188
  except Exception:
196
189
  continue
@@ -207,20 +200,17 @@ class PyLuaHelper:
207
200
  )
208
201
  if not version_match:
209
202
  return False
210
-
211
203
  act_version = [int(x) for x in version_match.groups()]
212
- min_version = [int(x) for x in self.min_lua_version.split(".")]
213
- max_version = [int(x) for x in self.max_lua_version.split(".")]
214
-
204
+ min_version = [int(x) for x in self._min_lua_version.split(".")]
205
+ max_version = [int(x) for x in self._max_lua_version.split(".")]
215
206
  # Check version range
216
207
  for i, (act, min_v, max_v) in enumerate(
217
208
  zip(act_version, min_version, max_version)
218
209
  ):
219
210
  if not (min_v <= act <= max_v):
220
211
  return False
221
-
222
212
  # Store the actual version if validation passes
223
- self.lua_actual_version = act_version
213
+ self._lua_actual_version = act_version
224
214
  return True
225
215
  except Exception:
226
216
  return False
@@ -228,49 +218,38 @@ class PyLuaHelper:
228
218
  def _run_lua_loader(self):
229
219
  """Execute the Lua loader script with appropriate parameters."""
230
220
  # Build command line arguments
231
- cmd = [self.lua_binary, os.path.join(os.path.dirname(__file__), "loader.lua")]
232
-
221
+ cmd = [self._lua_binary, os.path.join(os.path.dirname(__file__), "loader.lua")]
233
222
  # Add version info
234
223
  cmd.extend(
235
224
  [
236
225
  "-ver",
237
- str(self.lua_actual_version[0]),
238
- str(self.lua_actual_version[1]),
239
- str(self.lua_actual_version[2]),
226
+ str(self._lua_actual_version[0]),
227
+ str(self._lua_actual_version[1]),
228
+ str(self._lua_actual_version[2]),
240
229
  ]
241
230
  )
242
-
243
231
  # Add configuration parameters
244
- cmd.extend(["-c", self.lua_config_script])
245
-
232
+ cmd.extend(["-c", self._lua_config_script])
246
233
  # Add export variables
247
- for var in self.export_vars:
234
+ for var in self._export_vars:
248
235
  cmd.extend(["-e", var])
249
-
250
236
  # Add pre script
251
- if self.pre_script:
252
- cmd.extend(["-pre", self.pre_script])
253
-
237
+ if self._pre_script:
238
+ cmd.extend(["-pre", self._pre_script])
254
239
  # Add post script
255
- if self.post_script:
256
- cmd.extend(["-post", self.post_script])
257
-
240
+ if self._post_script:
241
+ cmd.extend(["-post", self._post_script])
258
242
  # Add extra strings
259
- for extra in self.extra_strings:
243
+ for extra in self._extra_strings:
260
244
  cmd.extend(["-ext", extra])
261
-
262
245
  # Add work directory
263
- cmd.extend(["-w", self.work_dir])
264
-
246
+ cmd.extend(["-w", self._work_dir])
265
247
  # Add temp directory
266
- cmd.extend(["-t", self.temp_dir])
267
-
248
+ cmd.extend(["-t", self._temp_dir])
268
249
  # Add -- separator
269
250
  cmd.append("--")
270
-
271
251
  # Add additional Lua arguments
272
- cmd.extend(self.lua_args)
273
-
252
+ cmd.extend(self._lua_args)
274
253
  # Execute the command
275
254
  try:
276
255
  result = subprocess.run(cmd, capture_output=True, text=True, timeout=180)
@@ -283,34 +262,61 @@ class PyLuaHelper:
283
262
  except subprocess.TimeoutExpired:
284
263
  raise RuntimeError("Lua loader timed out")
285
264
 
286
- def _parse_results(self):
287
- """Parse exported variables from temporary files."""
288
- # Read the list of exported variables
289
- try:
290
- self._export_list = os.listdir(self.data_dir)
291
- except Exception:
292
- self._export_list = []
265
+ def _parse_text_fields(self, file_path: str):
266
+ """
267
+ Parses a binary file containing UTF-8 text fields generated by loader.lua
293
268
 
294
- # Load each variable
295
- for filename in self._export_list:
296
- try:
297
- # Read data
298
- with open(os.path.join(self.data_dir, filename), "rb") as f:
299
- self._variables[filename] = f.read().decode(
300
- "utf-8", errors="ignore"
269
+ Args:
270
+ file_path (str): The path to the binary file.
271
+
272
+ Returns:
273
+ list: A list of strings containing the parsed UTF-8 fields.
274
+ """
275
+ fields = []
276
+ with open(file_path, "rb") as f:
277
+ file_content = f.read()
278
+ # Locate the start marker, set initial position
279
+ header_marker = b"start\xff\x00"
280
+ start_pos = file_content.find(header_marker)
281
+ if start_pos == -1:
282
+ raise ValueError(f"Failed to locate start marker at {file_path}")
283
+ current_pos = start_pos + len(header_marker)
284
+ # Read UTF8 text fields, separated with special sequence
285
+ separator = b"\xff\x00"
286
+ while True:
287
+ # Find the next separator
288
+ sep_pos = file_content.find(separator, current_pos)
289
+ if sep_pos != -1:
290
+ # Extract the bytes for the current field
291
+ field_bytes = file_content[current_pos:sep_pos]
292
+ field_str = field_bytes.decode("utf-8")
293
+ fields.append(field_str)
294
+ # Move pointer past the separator
295
+ current_pos = sep_pos + len(separator)
296
+ else:
297
+ # No separator found, this is the last field (no terminator at the end)
298
+ if current_pos < len(file_content):
299
+ raise ValueError(
300
+ f"Surplus data at the end of file, at pos: {current_pos}"
301
301
  )
302
- # Read metadata
303
- with open(os.path.join(self.meta_dir, filename), "rb") as f:
304
- self._metadata[filename] = f.read().decode("utf-8", errors="ignore")
305
- except Exception:
306
- # Skip problematic files
307
- continue
302
+ break
303
+ return fields
304
+
305
+ def _parse_results(self):
306
+ """Parse exported variables from temporary files."""
307
+ # Read exported data
308
+ exports = self._parse_text_fields(self._index_file)
309
+ meta = self._parse_text_fields(self._meta_file)
310
+ data = self._parse_text_fields(self._data_file)
311
+ for index, value in enumerate(exports):
312
+ self._variables[value] = data[index]
313
+ self._metadata[value] = meta[index]
308
314
 
309
315
  def _cleanup(self):
310
316
  """Clean up temporary directory."""
311
- if self.temp_dir and os.path.exists(self.temp_dir):
317
+ if self._temp_dir and os.path.exists(self._temp_dir):
312
318
  try:
313
- shutil.rmtree(self.temp_dir)
319
+ shutil.rmtree(self._temp_dir)
314
320
  except Exception:
315
321
  pass
316
322
 
@@ -394,7 +400,12 @@ class PyLuaHelper:
394
400
  try:
395
401
  value_type = self.get_type(key)
396
402
  if value_type == "boolean":
397
- return bool(self._variables.get(key, default))
403
+ value = self._variables.get(key)
404
+ if value == "true":
405
+ value = True
406
+ elif value == "false":
407
+ value = False
408
+ return bool(value)
398
409
  raise ValueError(f"Invalid value type: {value_type}")
399
410
  except ValueError:
400
411
  if default is not None:
@@ -27,7 +27,7 @@ config =
27
27
  mixed={ 1, "text", true, key="test_value" },
28
28
  empty_table={ },
29
29
  types = {
30
- b=true,
30
+ b=false,
31
31
  i=100,
32
32
  f=99.99,
33
33
  s="string value",
@@ -147,7 +147,7 @@ print(f"example.py: {cfg.get_list('config.sub.loader_args')}")
147
147
  # Test typed get
148
148
  print("example.py: === test getting values with specific type from config.sub.types table ===")
149
149
  print(f"example.py: get bool value, no fallback: cfg['config.sub.types.b'] = {cfg.get_bool('config.sub.types.b')}")
150
- print(f"example.py: get missing bool value, fallback: cfg['config.sub.types.b1'] = {cfg.get_bool('config.sub.types.b1', False)}")
150
+ print(f"example.py: get missing bool value, fallback: cfg['config.sub.types.b1'] = {cfg.get_bool('config.sub.types.b1', True)}")
151
151
  print(f"example.py: get bool value from int, fallback: cfg['config.sub.types.i'] = {cfg.get_bool('config.sub.types.i', False)}")
152
152
 
153
153
  print(f"example.py: get int value, no fallback: cfg['config.sub.types.i'] = {cfg.get_int('config.sub.types.i')}")
@@ -1 +0,0 @@
1
- 4f18ddae154e793e46eeab727c59ef1c0c0c2b744e7b94219710d76f530629ae *lua-5.4.8.tar.gz