haskell-gi 0.24.1 → 0.24.2
raw patch · 4 files changed
+25/−2 lines, 4 filesdep ~haskell-gi-basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: haskell-gi-base
API changes (from Hackage documentation)
Files
- ChangeLog.md +14/−0
- haskell-gi.cabal +2/−2
- lib/Data/GI/CodeGen/Code.hs +1/−0
- lib/Data/GI/CodeGen/Conversions.hsc +8/−0
ChangeLog.md view
@@ -1,3 +1,17 @@+### 0.24.2+++ Support for allocating GArrays of known size structs in caller-allocates arguments.++### 0.24.1+++ Add support for delete-attr override, to remove attributes.+++ Allow (but ignore) destroyers in scope async callbacks.++### 0.24.0+++ Added support for non-GObject objects+ ### 0.23.2 + Fix a possible segfault in functions that return an out pointer to a dynamically allocated array, but do not initialize the array if it has zero size. See [#289](https://github.com/haskell-gi/haskell-gi/issues/289) for an example.
haskell-gi.cabal view
@@ -1,5 +1,5 @@ name: haskell-gi-version: 0.24.1+version: 0.24.2 synopsis: Generate Haskell bindings for GObject Introspection capable libraries description: Generate Haskell bindings for GObject Introspection capable libraries. This includes most notably Gtk+, but many other libraries in the GObject ecosystem provide introspection data too.@@ -33,7 +33,7 @@ default-language: Haskell2010 pkgconfig-depends: gobject-introspection-1.0 >= 1.32, gobject-2.0 >= 2.32 build-depends: base >= 4.9 && < 5,- haskell-gi-base >= 0.24.0 && <0.25,+ haskell-gi-base >= 0.24.1 && <0.25, Cabal >= 1.24, attoparsec >= 0.13, containers,
lib/Data/GI/CodeGen/Code.hs view
@@ -926,6 +926,7 @@ , "import qualified Data.GI.Base.Attributes as GI.Attributes" , "import qualified Data.GI.Base.BasicTypes as B.Types" , "import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr"+ , "import qualified Data.GI.Base.GArray as B.GArray" , "import qualified Data.GI.Base.GClosure as B.GClosure" , "import qualified Data.GI.Base.GError as B.GError" , "import qualified Data.GI.Base.GVariant as B.GVariant"
lib/Data/GI/CodeGen/Conversions.hsc view
@@ -964,6 +964,14 @@ typeAllocInfo TGValue = let n = #{size GValue} in return $ Just $ TypeAlloc ("SP.callocBytes " <> tshow n) n+typeAllocInfo (TGArray t) = do+ api <- findAPI t+ case api of+ Just (APIStruct s) -> case structSize s of+ 0 -> return Nothing+ n -> let allocator = "B.GArray.allocGArray " <> tshow n+ in return $ Just $ TypeAlloc allocator n+ _ -> return Nothing typeAllocInfo t = do api <- findAPI t case api of