commit c2hs for openSUSE:Factory
Hello community, here is the log from the commit of package c2hs for openSUSE:Factory checked in at 2017-08-31 20:45:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/c2hs (Old) and /work/SRC/openSUSE:Factory/.c2hs.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "c2hs" Thu Aug 31 20:45:41 2017 rev:4 rq:513182 version:0.28.2 Changes: -------- --- /work/SRC/openSUSE:Factory/c2hs/c2hs.changes 2016-07-20 09:18:37.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.c2hs.new/c2hs.changes 2017-08-31 20:45:42.226067736 +0200 @@ -1,0 +2,5 @@ +Thu Jul 27 14:07:43 UTC 2017 - psimons@suse.com + +- Update to version 0.28.2. + +------------------------------------------------------------------- Old: ---- c2hs-0.28.1.tar.gz New: ---- c2hs-0.28.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ c2hs.spec ++++++ --- /var/tmp/diff_new_pack.eqhbl7/_old 2017-08-31 20:45:43.769851046 +0200 +++ /var/tmp/diff_new_pack.eqhbl7/_new 2017-08-31 20:45:43.773850485 +0200 @@ -1,7 +1,7 @@ # # spec file for package c2hs # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,15 +18,15 @@ %bcond_with tests Name: c2hs -Version: 0.28.1 +Version: 0.28.2 Release: 0 Summary: C->Haskell FFI tool that gives some cross-language type safety License: GPL-2.0+ -Group: System/Libraries +Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{name} Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz +BuildRequires: c2hs BuildRequires: ghc-Cabal-devel -# Begin cabal-rpm deps: BuildRequires: ghc-array-devel BuildRequires: ghc-bytestring-devel BuildRequires: ghc-containers-devel @@ -46,7 +46,6 @@ BuildRequires: ghc-text-devel BuildRequires: ghc-transformers-devel %endif -# End cabal-rpm deps %description C->Haskell assists in the development of Haskell bindings to C libraries. @@ -58,20 +57,14 @@ %prep %setup -q - %build %ghc_bin_build - %install %ghc_bin_install - %check -%if %{with tests} -%{cabal} test -%endif - +%cabal_test %files %defattr(-,root,root,-) ++++++ c2hs-0.28.1.tar.gz -> c2hs-0.28.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/ChangeLog new/c2hs-0.28.2/ChangeLog --- old/c2hs-0.28.1/ChangeLog 2016-04-01 17:39:33.000000000 +0200 +++ new/c2hs-0.28.2/ChangeLog 2017-03-06 22:07:57.000000000 +0100 @@ -1,3 +1,5 @@ +0.28.2 + - Switch to language-c 0.6 [#176] 0.28.1 - Switch to language-c 0.5 [#157] - Fix class hook problem with imports [#155] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/c2hs.cabal new/c2hs-0.28.2/c2hs.cabal --- old/c2hs-0.28.1/c2hs.cabal 2016-04-01 17:39:32.000000000 +0200 +++ new/c2hs-0.28.2/c2hs.cabal 2017-03-06 22:07:57.000000000 +0100 @@ -1,12 +1,12 @@ Name: c2hs -Version: 0.28.1 +Version: 0.28.2 License: GPL-2 License-File: COPYING Copyright: Copyright (c) 1999-2007 Manuel M T Chakravarty 2005-2013 Duncan Coutts 2008 Benedikt Huber Author: Manuel M T Chakravarty -Maintainer: chak@cse.unsw.edu.au, duncan@community.haskell.org, ian@skybluetrades.net +Maintainer: chak@cse.unsw.edu.au, duncan@community.haskell.org, ian@skybluetrades.net, aditya.siram@gmail.com Stability: Stable Homepage: https://github.com/haskell/c2hs Bug-Reports: https://github.com/haskell/c2hs/issues @@ -101,6 +101,7 @@ tests/bugs/issue-151/*.chs tests/bugs/issue-151/*.h tests/bugs/issue-152/*.chs tests/bugs/issue-152/*.h tests/bugs/issue-155/*.chs tests/bugs/issue-155/*.h + tests/bugs/issue-180/*.chs tests/bugs/issue-180/*.h source-repository head type: git @@ -111,7 +112,7 @@ Executable c2hs Build-Depends: base >= 2 && < 5, bytestring, - language-c >= 0.5 && < 0.6, + language-c >= 0.6 && < 0.7, filepath, dlist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/src/C2HS/Gen/Bind.hs new/c2hs-0.28.2/src/C2HS/Gen/Bind.hs --- old/c2hs-0.28.1/src/C2HS/Gen/Bind.hs 2016-04-01 17:39:32.000000000 +0200 +++ new/c2hs-0.28.2/src/C2HS/Gen/Bind.hs 2017-03-06 22:07:57.000000000 +0100 @@ -521,7 +521,9 @@ else doSplit 0 mln True (f:acc) fs' | otherwise = if null (dropWhile isSpace s) || isJust mln then doSplit 0 mln wh (f:acc) fs' - else doSplit 0 (Just $ posRow pos) wh (f:acc) fs' + else doSplit 0 mln' wh (f:acc) fs' + where mln' | isSourcePos pos = Just $ posRow pos + | otherwise = Nothing doSplit cdep mln wh acc (f@(CHSVerb s _) : fs') | s == "-}" = doSplit (cdep-1) mln wh (f:acc) fs' | s == "{-" = doSplit (cdep+1) mln wh (f:acc) fs' @@ -1438,7 +1440,11 @@ parms' <- addDft parms'' cts return (CHSParm imMarsh' hsTy True omMarsh' False p c : parms') addDft [] [] = return [] - addDft ((CHSParm _ _ _ _ _ pos' _):_) [] = + addDft (CHSPlusParm _:_) [] = + marshArgMismatchErr pos "This parameter is in excess of the C arguments." + addDft (CHSParm _ _ _ _ _ pos' _:_) [] = + marshArgMismatchErr pos' "This parameter is in excess of the C arguments." + addDft (CHSParm _ _ True _ _ pos' _:_) [_] = marshArgMismatchErr pos' "This parameter is in excess of the C arguments." addDft [] (_:_) = marshArgMismatchErr pos "Parameter marshallers are missing." @@ -2303,7 +2309,7 @@ hasStdCallAttr = any isStdCallAttr . funAttrs funAttrs (CDecl specs declrs _) = - let (_,attrs',_,_,_) = partitionDeclSpecs specs + let (_,attrs',_,_,_,_) = partitionDeclSpecs specs in attrs' ++ funEndAttrs declrs ++ funPtrAttrs declrs -- attrs after the function name, e.g. void foo() __attribute__((...)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/src/Data/NameSpaces.hs new/c2hs-0.28.2/src/Data/NameSpaces.hs --- old/c2hs-0.28.1/src/Data/NameSpaces.hs 2016-04-01 17:39:32.000000000 +0200 +++ new/c2hs-0.28.2/src/Data/NameSpaces.hs 2017-03-06 22:07:57.000000000 +0100 @@ -77,7 +77,7 @@ -- -- * if the identfier is already declared, the resulting name space contains -- the new binding and the second component of the result contains the --- definition declared previosuly (which is henceforth not contained in the +-- definition declared previously (which is henceforth not contained in the -- name space anymore) -- defGlobal :: NameSpace a -> Ident -> a -> (NameSpace a, Maybe a) @@ -105,7 +105,7 @@ -- -- * if the identfier is already declared, the resulting name space contains -- the new binding and the second component of the result contains the --- definition declared previosuly (which is henceforth not contained in the +-- definition declared previously (which is henceforth not contained in the -- name space anymore) -- defLocal :: NameSpace a -> Ident -> a -> (NameSpace a, Maybe a) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/tests/bugs/issue-128/issue128.c new/c2hs-0.28.2/tests/bugs/issue-128/issue128.c --- old/c2hs-0.28.1/tests/bugs/issue-128/issue128.c 2016-04-01 17:39:33.000000000 +0200 +++ new/c2hs-0.28.2/tests/bugs/issue-128/issue128.c 2017-03-06 22:07:57.000000000 +0100 @@ -20,6 +20,7 @@ tststruct *p = (tststruct *)malloc(sizeof(tststruct)); p->a = ain; p->b = false; + return p; } void free_tststruct(tststruct *s) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/tests/bugs/issue-180/Issue180.chs new/c2hs-0.28.2/tests/bugs/issue-180/Issue180.chs --- old/c2hs-0.28.1/tests/bugs/issue-180/Issue180.chs 1970-01-01 01:00:00.000000000 +0100 +++ new/c2hs-0.28.2/tests/bugs/issue-180/Issue180.chs 2017-03-06 22:07:57.000000000 +0100 @@ -0,0 +1,13 @@ +module Main where + +#include "issue180.h" + +marshalIn = undefined + +{#fun pure test as test1 + { 'marshalIn'* `Int'&} -> `()' #} + +main :: IO () +main = do + test + print "OK" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/tests/bugs/issue-180/issue180.h new/c2hs-0.28.2/tests/bugs/issue-180/issue180.h --- old/c2hs-0.28.1/tests/bugs/issue-180/issue180.h 1970-01-01 01:00:00.000000000 +0100 +++ new/c2hs-0.28.2/tests/bugs/issue-180/issue180.h 2017-03-06 22:07:57.000000000 +0100 @@ -0,0 +1 @@ +void test(int arg); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/c2hs-0.28.1/tests/test-bugs.hs new/c2hs-0.28.2/tests/test-bugs.hs --- old/c2hs-0.28.1/tests/test-bugs.hs 2016-04-01 17:39:32.000000000 +0200 +++ new/c2hs-0.28.2/tests/test-bugs.hs 2017-03-06 22:07:57.000000000 +0100 @@ -92,6 +92,7 @@ , testCase "Issue #151" issue151 , testCase "Issue #152" issue152 , testCase "Issue #155" issue155 + , testCase "Issue #180" issue180 ] ++ -- Some tests that won't work on Windows. if os /= "cygwin32" && os /= "mingw32" @@ -112,6 +113,17 @@ let expected = ["upper C();", "lower c();", "upper C();"] liftIO $ assertBool "" (T.lines res == expected) +issue180 :: Assertion +issue180 = c2hsShelly $ chdir "tests/bugs/issue-180" $ do + mapM_ rm_f ["Issue180.chs.h"] + errExit False $ do + run "c2hs" [toTextIgnore "Issue180.chs"] + code <- lastExitCode + liftIO $ assertEqual "error code" 1 code + stderr <- lastStderr + let excessMsgCount = T.count "excess of the C arguments" stderr + liftIO $ assertBool "correct error message" (excessMsgCount == 1) + issue155 :: Assertion issue155 = c2hsShelly $ chdir "tests/bugs/issue-155" $ do mapM_ rm_f ["Issue155.hs", "Issue155.chs.h", "Issue155.chs.c", "Issue155.chi",
participants (1)
-
root@hilbert.suse.de