lua 2.2.0 → 2.2.1
raw patch · 5 files changed
+24/−7 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Lua.Primary: lua_close_ptr :: FunPtr (Ptr () -> IO ())
Files
- CHANGELOG.md +8/−0
- LICENSE +1/−1
- lua.cabal +3/−3
- src/Lua/Auxiliary.hs +6/−3
- src/Lua/Primary.hs +6/−0
CHANGELOG.md view
@@ -2,6 +2,14 @@ `lua` uses [PVP Versioning][]. +## lua-2.2.1++Released 2022-06-19.++- Make string-peeking independent of the current foreign+ encoding: always use char8 encoding to retrieve values of+ `LUA_PRELOAD_TABLE` and `LUA_LOADED_TABLE`.+ ## lua-2.2.0 Released 2022-02-19.
LICENSE view
@@ -1,4 +1,4 @@-Copyright © 1994-2020 Lua.org, PUC-Rio.+Copyright © 1994-2022 Lua.org, PUC-Rio. Copyright © 2007-2012 Gracjan Polak Copyright © 2012-2015 Ömer Sinan Ağacan Copyright © 2016-2022 Albert Krewinkel
lua.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: lua-version: 2.2.0+version: 2.2.1 synopsis: Lua, an embeddable scripting language description: This package provides bindings and types to bridge Haskell and <https://www.lua.org/ Lua>.@@ -29,8 +29,8 @@ , GHC == 8.6.5 , GHC == 8.8.4 , GHC == 8.10.7- , GHC == 9.0.1- , GHC == 9.2.1+ , GHC == 9.0.2+ , GHC == 9.2.3 source-repository head type: git
src/Lua/Auxiliary.hs view
@@ -38,7 +38,8 @@ import Lua.Types as Lua import Foreign.Ptr import System.IO.Unsafe (unsafePerformIO)-import qualified Foreign.C as C+import qualified GHC.Foreign as GHC+import qualified GHC.IO.Encoding as GHC #ifdef ALLOW_UNSAFE_GC #define SAFTY unsafe@@ -50,7 +51,8 @@ -- | Key, in the registry, for table of loaded modules. loadedTableRegistryField :: String-loadedTableRegistryField = unsafePerformIO (C.peekCString c_loaded_table)+loadedTableRegistryField = unsafePerformIO $ do+ GHC.peekCString GHC.char8 c_loaded_table {-# NOINLINE loadedTableRegistryField #-} foreign import capi unsafe "lauxlib.h value LUA_LOADED_TABLE"@@ -58,7 +60,8 @@ -- | Key, in the registry, for table of preloaded loaders. preloadTableRegistryField :: String-preloadTableRegistryField = unsafePerformIO (C.peekCString c_preload_table)+preloadTableRegistryField = unsafePerformIO $ do+ GHC.peekCString GHC.char8 c_preload_table {-# NOINLINE preloadTableRegistryField #-} foreign import capi unsafe "lauxlib.h value LUA_PRELOAD_TABLE"
src/Lua/Primary.hs view
@@ -30,6 +30,7 @@ , lua_arith , lua_checkstack , lua_close+ , lua_close_ptr , lua_concat , lua_copy , lua_createtable@@ -188,6 +189,11 @@ -- <https://www.lua.org/manual/5.4/manual.html#lua_close> foreign import capi safe "lua.h lua_close" lua_close :: Lua.State -> IO ()++-- | Function pointer to function 'lua_close'; intended to be used with+-- 'Foreign.ForeignPtr.newForeignPtr'.+foreign import ccall safe "lua.h &lua_close"+ lua_close_ptr :: FunPtr (Ptr () -> IO ()) -- | Concatenates the @n@ values at the top of the stack, pops them, and -- leaves the result at the top. If @n@ is 1, the result is the single