Repository navigation
v0.3.1
Release 0.3.1
Native library for hosting the SLua runtime: slua_shim for Windows x64 and Linux x64. The package
built from these files carries no managed code; the host binds to the C interface in slua_shim.h.
- Runtime pin: 9dae328 (the commit of the SLua tree the libraries are built against)
- API version: 5 (a host must check
slua_api_version()for an exact match) - Saved-state stamp format:
runtime=<pin> api=<n>;slua_versionreturns the same text,
hereruntime=9dae3285f6 api=5 - Built from commit: 5afc9eb
Every file was built or copied by one CI run from that commit. SHA256SUMS.txt lists the SHA-256 of
every other file in the release (check with sha256sum -c SHA256SUMS.txt).
| File | Contents |
|---|---|
slua-native-win-x64-0.3.1.zip |
slua_shim.dll |
slua-native-linux-x64-0.3.1.tar.gz |
libslua_shim.so, built on Ubuntu 22.04 |
slua_shim.h |
the C interface |
THIRD-PARTY-NOTICES.txt, licenses.zip |
licences of everything linked into the libraries |
What changed since 0.3.0 (API version unchanged at 5)
The exports, their signatures and the API version are the same as in 0.3.0. A host that needs API version 5 loads this library as it loaded the last one.
- A script that caught an error with
pcallinside an event handler faulted withcorrupt yield stateonce the handler returned. The event dispatcher saved its yield state only when the handler yielded; an error caught by apcallin the handler unwinds the dispatcher's frame without a yield, and the dispatcher then read a state that was never written. The dispatcher now saves its state before it calls the handler (YIELD_CALL_SAVING_STATEinVM/include/lyieldablemacros.h). - The same defect was in every other yieldable function that calls script code. It now applies to
string.gsubwith a replacement function,table.sortwith a comparison function,lljson.encode(thereplaceroption and__tojsonmetamethods),lljson.decode(the reviver) and theLLTimerstick that calls a timer's handler. A callback that caught an error made the function lose its state (corrupt yield state) or read the wrong value:string.gsubkept the original text,table.sortdid not reorder,lljson.encodewrotenull. - The saved state now also records where the callback's results sit on the frame, and the "yielding" mark that the early save sets is cleared again when the callback returns without a yield, so the chained helpers of
table.sortand the JSON functions can use it. A first attempt that only saved the state before every call broke seven of the runtime's own conformance tests for this reason. ngc-host/LL-RUNTIME-PINnames the commit that carries this change (it changes files of the parent tree), and the stamp's runtime part is that commit. Scripts saved by 0.3.0 start fresh once because the runtime part of the stamp changed.