hslua-objectorientation 2.1.0 → 2.2.0
raw patch · 3 files changed
+13/−7 lines, 3 filesdep ~hslua-coredep ~hslua-marshallingPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hslua-core, hslua-marshalling
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- hslua-objectorientation.cabal +3/−3
- src/HsLua/ObjectOrientation.hs +4/−4
CHANGELOG.md view
@@ -2,6 +2,12 @@ `hslua-objectorientation` uses [PVP Versioning][]. +## hslua-objectorientation-2.2.0++Released 2022-02-19.++- Require version 2.2 of hslua-core and hslua-marshalling.+ ## hslua-objectorientation-2.1.0 Released 29-01-2022.
hslua-objectorientation.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.2 name: hslua-objectorientation-version: 2.1.0+version: 2.2.0 synopsis: Object orientation tools for HsLua description: Expose Haskell objects to Lua with an object oriented interface.@@ -35,8 +35,8 @@ , bytestring >= 0.10.2 && < 0.12 , containers >= 0.5.9 && < 0.7 , exceptions >= 0.8 && < 0.11- , hslua-core >= 2.1 && < 2.2- , hslua-marshalling >= 2.1 && < 2.2+ , hslua-core >= 2.2 && < 2.3+ , hslua-marshalling >= 2.2 && < 2.3 , mtl >= 2.2 && < 2.3 , text >= 1.2 && < 2.1 ghc-options: -Wall
src/HsLua/ObjectOrientation.hs view
@@ -385,7 +385,7 @@ -- | Pushes a userdata value of the given type. pushUD :: LuaError e => UDTypeWithList e fn a itemtype -> a -> LuaE e () pushUD ty x = do- newhsuserdata x+ newhsuserdatauv x 1 pushUDMetatable ty setmetatable (nth 2) -- add list as value in caching table@@ -394,18 +394,18 @@ Just ((_, toList), _) -> do newtable pushName "__lazylist"- newhsuserdata (toList x)+ newhsuserdatauv (toList x) 1 void (newudmetatable lazyListStateName) setmetatable (nth 2) rawset (nth 3)- setuservalue (nth 2)+ void (setiuservalue (nth 2) 1) -- | Retrieves a userdata value of the given type. peekUD :: LuaError e => UDTypeWithList e fn a itemtype -> Peeker e a peekUD ty idx = do let name = udName ty x <- reportValueOnFailure name (`fromuserdata` name) idx- (`lastly` pop 1) $ liftLua (getuservalue idx) >>= \case+ (`lastly` pop 1) $ liftLua (getiuservalue idx 1) >>= \case TypeTable -> do -- set list xWithList <- maybe pure setList (udListSpec ty) x