packages feed

hslua 1.0.3 → 1.0.3.1

raw patch · 3 files changed

+14/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,15 @@ ## Changelog +### 1.0.3.1++Released 2019-05-08.++- Prevent filenames being treated as strings in debug messages.+  Lua's `loadbuffer` takes a `source` description as an argument,+  which is used for debug messages. The `loadfile` function now+  adds a special prefix (`@`) to `source`, thus marking it as a+  filename.+ ### 1.0.3  Released 2019-05-04.
hslua.cabal view
@@ -1,5 +1,5 @@ name:                hslua-version:             1.0.3+version:             1.0.3.1 synopsis:            Bindings to Lua, an embeddable scripting language description:         HsLua provides bindings, wrappers, types, and helper                      functions to bridge Haskell and <https://www.lua.org/ Lua>.
src/Foreign/Lua/Core/Auxiliary.hsc view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE OverloadedStrings #-} {-| Module      : Foreign.Lua.Core.Auxiliary Copyright   : © 2007–2012 Gracjan Polak,@@ -35,6 +36,7 @@  import Control.Exception (IOException, try) import Data.ByteString (ByteString)+import Data.Monoid ((<>)) import Foreign.C ( CChar, CInt (CInt), CSize (CSize), CString                  , withCString, peekCString ) import Foreign.Lua.Core.Constants (multret, registryindex)@@ -182,7 +184,7 @@ loadfile :: FilePath -- ^ filename          -> Lua Status loadfile fp = Lua.liftIO contentOrError >>= \case-  Right script -> loadbuffer script fp+  Right script -> loadbuffer script ("@" <> fp)   Left e -> do     Lua.pushstring (Utf8.fromString (show e))     return Lua.ErrFile