C->Haskell 0.14.5 improves pointer hooks: * Proper handling of struct/unions, courtesy of Jelmer Vernooij * The `nocode' directive enables pointer hooks that generate no code, which is useful when a binding wants to use some definitions from another binding that was not generate with C->Haskell. Full details appended. Happy Hacking! Manuel -=- darcs changes says -=- Mon Dec 12 22:50:38 EST 2005 Manuel M T Chakravarty <chak@cse.unsw.edu.au> tagged c2hs 0.14.5 Mon Dec 12 22:45:03 EST 2005 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Pointer hooks translate raw types - This fixes a long standing bug that over which I only stumbled by accident. When we translate a C type being the target if a pointer hook into a Haskell type, we must disregard the pointer hook alias map. The problem occured as the `extractCompType' function is used in two different kind of contexts: (a) when handling pointer hooks and (b) when translating function signatures for foreign import declarations. The function must behave slightly differently in both contexts, but didn't do that so far. Mon Dec 12 12:12:50 EST 2005 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Added nocode to pointer hooks Tue Dec 6 14:40:25 EST 2005 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Updated todo list Tue Dec 6 04:26:23 EST 2005 Jelmer Vernooij <jelmer@samba.org> * Only match in `checkForOneCUName' if there are no indirections Without this patch, the following code: #c struct foostruct { char x; }; void bar2(struct foostruct **a); #endc {#pointer *foostruct as Foo newtype#} test2 = {#call bar2#} would give foreign import ccall safe "test-pp.h bar2" bar2 :: ((Foo) -> (IO ())) with this patch, it generates: foreign import ccall safe "test-pp.h bar2" bar2 :: ((Ptr (Foo)) -> (IO ())) Tue Dec 6 04:25:12 EST 2005 Jelmer Vernooij <jelmer@samba.org> * Add missing ChangeLog entry Tue Dec 6 00:19:50 EST 2005 Jelmer Vernooij <jelmer@samba.org> * Support mapping struct and union names to haskell types Mon Dec 5 23:29:40 EST 2005 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Log entry for Jelmer's first patch Fri Nov 25 10:54:56 EST 2005 Jelmer Vernooij <jelmer@samba.org> * add prettify functions for structs, enums and unions Mon Aug 15 11:47:19 EST 2005 Manuel M T Chakravarty <chak@cse.unsw.edu.au> * Build-Depends fix
participants (1)
-
Manuel M T Chakravarty