Hello community, here is the log from the commit of package ghc-hslua for openSUSE:Factory checked in at 2019-08-24 18:44:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-hslua (Old) and /work/SRC/openSUSE:Factory/.ghc-hslua.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-hslua" Sat Aug 24 18:44:19 2019 rev:15 rq:725520 version:1.0.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-hslua/ghc-hslua.changes 2019-05-17 23:42:50.825923234 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-hslua.new.7948/ghc-hslua.changes 2019-08-24 18:44:20.485769256 +0200 @@ -1,0 +2,23 @@ +Thu Aug 22 02:02:16 UTC 2019 - [email protected] + +- Update hslua to version 1.0.3.2. + ### 1.0.3.2 + + Released 2019-08-21. + + - Added flag to use hardcoded values for registry keys: The names + of the registry keys used to store package information are + available as CPP values from file lauxlib.h since Lua 5.3.4; + compiling HsLua against older Lua versions was not possible, as + those values were expected to exist. + + The respective values are now hardcoded into HsLua, and a new + flag `hardcode-reg-key` is introduced, which will cause the use + of these hardcoded values instead of those defined in + lauxlib.h. Using this flag makes it possible to compile hslua + against all Lua 5.3.* versions. + + - Added missing C files for benchmarking to list of + *extra-source-files*. + +------------------------------------------------------------------- Old: ---- hslua-1.0.3.1.tar.gz New: ---- hslua-1.0.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-hslua.spec ++++++ --- /var/tmp/diff_new_pack.bpZPLE/_old 2019-08-24 18:44:21.005769206 +0200 +++ /var/tmp/diff_new_pack.bpZPLE/_new 2019-08-24 18:44:21.009769206 +0200 @@ -19,7 +19,7 @@ %global pkg_name hslua %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.0.3.1 +Version: 1.0.3.2 Release: 0 Summary: Bindings to Lua, an embeddable scripting language License: MIT ++++++ hslua-1.0.3.1.tar.gz -> hslua-1.0.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-1.0.3.1/CHANGELOG.md new/hslua-1.0.3.2/CHANGELOG.md --- old/hslua-1.0.3.1/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100 +++ new/hslua-1.0.3.2/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +1,25 @@ ## Changelog + +### 1.0.3.2 + +Released 2019-08-21. + +- Added flag to use hardcoded values for registry keys: The names + of the registry keys used to store package information are + available as CPP values from file lauxlib.h since Lua 5.3.4; + compiling HsLua against older Lua versions was not possible, as + those values were expected to exist. + + The respective values are now hardcoded into HsLua, and a new + flag `hardcode-reg-key` is introduced, which will cause the use + of these hardcoded values instead of those defined in + lauxlib.h. Using this flag makes it possible to compile hslua + against all Lua 5.3.* versions. + +- Added missing C files for benchmarking to list of + *extra-source-files*. + ### 1.0.3.1 Released 2019-05-08. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-1.0.3.1/benchmark/benchmark-functions.h new/hslua-1.0.3.2/benchmark/benchmark-functions.h --- old/hslua-1.0.3.1/benchmark/benchmark-functions.h 1970-01-01 01:00:00.000000000 +0100 +++ new/hslua-1.0.3.2/benchmark/benchmark-functions.h 1970-01-01 01:00:00.000000000 +0100 @@ -0,0 +1,5 @@ +#include "lua.h" + +int hslua_getlfield(lua_State *L, int index, const char *k, size_t len); + +int hslua_setfield(lua_State *L, int index, const char *k); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-1.0.3.1/hslua.cabal new/hslua-1.0.3.2/hslua.cabal --- old/hslua-1.0.3.1/hslua.cabal 1970-01-01 01:00:00.000000000 +0100 +++ new/hslua-1.0.3.2/hslua.cabal 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +1,5 @@ name: hslua -version: 1.0.3.1 +version: 1.0.3.2 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>. @@ -23,6 +23,8 @@ build-type: Simple extra-source-files: cbits/lua-5.3.5/*.h cbits/error-conversion/*.h + benchmark/benchmark-functions.h + benchmark/benchmark-functions.c README.md CHANGELOG.md test/lua/*.lua @@ -70,6 +72,15 @@ description: Use @pkg-config@ to discover library and include paths. Setting this flag implies `system-lua`. +flag hardcode-reg-keys + default: False + manual: True + + description: Don't use CAPI to determine the names of certain registry + key names but Use hard coded values for instead. This + flag is required when compiling against Lua 5.3.3 or + earlier, as those do not expose the necessary information + in the @lauxlib.h@ header file. library exposed-modules: Foreign.Lua @@ -175,6 +186,9 @@ if flag(allow-unsafe-gc) cpp-options: -DALLOW_UNSAFE_GC + if flag(hardcode-reg-keys) + cpp-options: -DHARDCODE_REG_KEYS + test-suite test-hslua type: exitcode-stdio-1.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hslua-1.0.3.1/src/Foreign/Lua/Core/Auxiliary.hsc new/hslua-1.0.3.2/src/Foreign/Lua/Core/Auxiliary.hsc --- old/hslua-1.0.3.1/src/Foreign/Lua/Core/Auxiliary.hsc 1970-01-01 01:00:00.000000000 +0100 +++ new/hslua-1.0.3.2/src/Foreign/Lua/Core/Auxiliary.hsc 1970-01-01 01:00:00.000000000 +0100 @@ -37,14 +37,12 @@ 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.C ( CChar, CInt (CInt), CSize (CSize), CString, withCString ) import Foreign.Lua.Core.Constants (multret, registryindex) import Foreign.Lua.Core.Error (hsluaErrorRegistryField, throwTopMessage) import Foreign.Lua.Core.Types (Lua, Reference, StackIndex, Status, liftLua) import Foreign.Marshal.Alloc (alloca) import Foreign.Ptr -import System.IO.Unsafe (unsafePerformIO) import qualified Data.ByteString as B import qualified Foreign.Lua.Core.Functions as Lua @@ -52,6 +50,11 @@ import qualified Foreign.Lua.Utf8 as Utf8 import qualified Foreign.Storable as Storable +#ifndef HARDCODE_REG_KEYS +import System.IO.Unsafe (unsafePerformIO) +import qualified Foreign.C as C +#endif + ##ifdef ALLOW_UNSAFE_GC ##define SAFTY unsafe ##else @@ -64,19 +67,27 @@ -- | Key, in the registry, for table of loaded modules. loadedTableRegistryField :: String -loadedTableRegistryField = unsafePerformIO (peekCString c_loaded_table) +#ifdef HARDCODE_REG_KEYS +loadedTableRegistryField = "_LOADED" +#else +loadedTableRegistryField = unsafePerformIO (C.peekCString c_loaded_table) {-# NOINLINE loadedTableRegistryField #-} foreign import capi "lauxlib.h value LUA_LOADED_TABLE" c_loaded_table :: CString +#endif -- | Key, in the registry, for table of preloaded loaders. preloadTableRegistryField :: String -preloadTableRegistryField = unsafePerformIO (peekCString c_preload_table) +#ifdef HARDCODE_REG_KEYS +preloadTableRegistryField = "_PRELOAD" +#else +preloadTableRegistryField = unsafePerformIO (C.peekCString c_preload_table) {-# NOINLINE preloadTableRegistryField #-} foreign import capi "lauxlib.h value LUA_PRELOAD_TABLE" c_preload_table :: CString +#endif -- | Loads and runs the given string. --
