Re: [xml] "double"s and schema validation
- From: Daniel Veillard <veillard redhat com>
- To: "Andrew W. Nosenko" <andrew w nosenko gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] "double"s and schema validation
- Date: Wed, 28 Jul 2010 18:43:31 +0200
On Wed, Jul 28, 2010 at 03:52:44PM +0300, Andrew W. Nosenko wrote:
On Wed, Jul 28, 2010 at 14:50, Csaba Raduly <rcsaba gmail com> wrote:
On Wed, Jul 28, 2010 at 11:44 AM, Daniel Veillard wrote:
On Thu, Jul 22, 2010 at 02:38:16PM +0200, Csaba Raduly wrote:
Anyway, here's a revised version:
--- xmlschemastypes2.c 2010-07-21 13:17:12.229467800 +0200
+++ xmlschemastypes.c 2010-07-22 14:00:05.965759600 +0200
(snip)
+ if (digits_before + digits_after == 0)
+ goto return1;
Okay that patch looks fine, except for mail mangling and code format,
so I applied it manually, look fine, passes regtests, so pushed to git,
I think Andrew Nosenko is right, it would be better to test these
separately and not added together:
if (digits_before==0 && digits_after==0)
goto return1;
Excuse me, but my point was not about checking counters separately,
but about there no need counters at all -- single boolean flag is
fairly enough.
Honnestly it's not a big deal, but I prefer explicit 0 checks rather
than the addition hack, it's nicer to read. Actually in such code I
think readability is more important than trying to optimize, the
compiler will do it just fine, and that path ain't critical. On the
other hand the maintainability is a serious concern,
thanks to both of you :-)
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]