On Fri, 2008-06-20 at 10:54 +0100, Duncan Coutts wrote:
> > What do you think?
> 
> I don't think convincing Manuel is the hard part if we do it properly.
> The "Right Thing"tm to do, it would appear to me, is to extend the {#
> call #} hooks with the same marshaling support as the {# fun #}
> hooks. 
> 
> It'd need an extra tag to indicate that one wants it. eg:
> 
>   {# call marshal gtk_foo_bar #} 

My aim is to have a solution for which we do not have to touch every
line of Gtk2Hs. I can't recall all the details but we/I did have a
conversation with Manuel about the logic about his marshalling support
and what we/I have added to the local c2hs branch seems to be inherently
incompatible with Manuel's concept. Thus, if we want to get our changes
into the main c2hs, I would probably require a flag called

--use-odd-Gtk2Hs-marshalling

which nobody else but us should use.

I should probably dig out the details of his conceptual take versus our
c2hs implementation in order to clarify how the two approaches are
irreconcilable. I think the gist was that {#call #} shouldn't do any
marshalling whereas {#fun #} does but has already different support. In
contrast, we make {#call #} do marshalling for arguments that are
defined as {#pointer foreign newtype#} but return values are not
automatically turned into a foreign pointer. This is indeed
inconsistent, but probably necessary to test for NULL pointers.

I oppose touching every line in Gtk2hs since 10% of functions that need
to be done by hand. 10%*20000 lines = 2000 lines that need rewriting,
besides the merging. If we opt for this, we're going to stall the
development of Gtk2Hs even more -- and we haven't done that much in the
last years! The only viable option IMHO would be a sed solution in which
we replace {#call with {#call ptrAuto or some such.

My 2p,
Axel.

P.S.: If you have any changes to the signals, by all means, please
commit. Did we reach some sort of consensus with respect to how
overlapping signal names should be dealt with?



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Gtk2hs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to