I just talked to Jürg in IRC, and he prefers the old version too, so
it's going to get reverted.

Jiří, do you think the attached patch is sufficient for documentation?
It just adds a link to l.g.o/Vala/MarkupSample, which we can change at
will. I don't think we should put too much documentation in the vapi,
but I like the idea of at least linking to a sample...


-E



On Tue, 2010-01-26 at 23:28 +0100, Jiří Zárevúcky wrote:
> Michael 'Mickey' Lauer píše v Út 26. 01. 2010 v 23:24 +0100:
> > Am Dienstag, den 26.01.2010, 15:48 -0600 schrieb Sandino Flores Moreno:
> > > The next URL has the testcase:
> > > https://bugzilla.gnome.org/attachment.cgi?id=152347
> > > 
> > > It demonstrates that using methods as callbacks
> > > with MarkupParser is possible without introducing
> > > strange parameters neither restricting the methods to be static.
> > > 
> > > It's the same parser I had written in Genie, just simplified and
> > > translated to vala.
> > 
> > Thanks for this example. This indeed convinces me to toss a vote for the
> > revert -- sorry Jiří. In this case I prefer usability over theoretical
> > correctness.
> > 
> 
> Theoretical correctness aside, any other use case leads to broken C
> code, which is far from my definition of usability. I have no problem
> with the old way, *in case* it gets properly addressed in the
> documentation *and* as a comment in the VAPI. There is nothing more
> annoying that bindings that require undocumented magic to work. 
> 

>From a5a0f9096902603d6d091a50507b3ad94b91b3f4 Mon Sep 17 00:00:00 2001
From: Evan Nemerson <[email protected]>
Date: Tue, 26 Jan 2010 14:42:32 -0800
Subject: [PATCH] glib-2.0: revert previous patch against MarkupParser callbacks.

The new version sacrificed usability for theoretical correctness, and
was not well received.
---
 vapi/glib-2.0.vapi |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index d170aff..62896a6 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -2830,7 +2830,8 @@ namespace GLib {
 		public string[] fetch_all ();
 	}
 
-	/* Simple XML Subset Parser */
+	/* Simple XML Subset Parser
+	   See http://live.gnome.org/Vala/MarkupSample for an example */
 
 	public errordomain MarkupError {
 		BAD_UTF8,
-- 
1.6.6

_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to