rpms/GConf2/devel gconf-less-work.patch, NONE, 1.1 GConf2.spec, 1.98, 1.99
Matthias Clasen
mclasen at fedoraproject.org
Wed Mar 4 04:16:29 UTC 2009
Author: mclasen
Update of /cvs/pkgs/rpms/GConf2/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15199
Modified Files:
GConf2.spec
Added Files:
gconf-less-work.patch
Log Message:
do less work
gconf-less-work.patch:
--- NEW FILE gconf-less-work.patch ---
diff -up GConf-2.25.2/backends/markup-tree.c.less-work GConf-2.25.2/backends/markup-tree.c
--- GConf-2.25.2/backends/markup-tree.c.less-work 2009-02-16 19:15:19.000000000 -0500
+++ GConf-2.25.2/backends/markup-tree.c 2009-03-03 23:14:07.741320798 -0500
@@ -2167,51 +2167,40 @@ locate_attributes (GMarkupParseContext *
retval = TRUE;
- i = 0;
- while (attribute_names[i])
+ for (i = 0; attribute_names[i]; i++)
{
int j;
- gboolean found;
- found = FALSE;
- j = 0;
- while (j < n_attrs)
+ for (j = 0; j < n_attrs; j++)
{
+ /* already matched */
+ if (attrs[j].name == NULL)
+ continue;
+
if (strcmp (attrs[j].name, attribute_names[i]) == 0)
{
retloc = attrs[j].retloc;
+ attrs[j].name = NULL;
- if (*retloc != NULL)
- {
- set_error (error, context,
- GCONF_ERROR_PARSE_ERROR,
- _("Attribute \"%s\" repeated twice on the same <%s> element"),
- attrs[j].name, element_name);
- retval = FALSE;
- goto out;
- }
+ /* if this fails we passed the same retloc twice */
+ g_assert (*retloc == NULL);
*retloc = attribute_values[i];
- found = TRUE;
+ break;
}
-
- ++j;
}
- if (!found)
+ if (j >= n_attrs)
{
set_error (error, context,
GCONF_ERROR_PARSE_ERROR,
- _("Attribute \"%s\" is invalid on <%s> element in this context"),
+ _("Attribute \"%s\" is invalid, or duplicated on <%s> element in this context"),
attribute_names[i], element_name);
retval = FALSE;
- goto out;
+ break;
}
-
- ++i;
}
- out:
return retval;
}
@@ -3494,10 +3483,9 @@ all_whitespace (const char *text,
while (p != end)
{
- if (!g_ascii_isspace (*p))
- return FALSE;
-
- p = g_utf8_next_char (p);
+ if (G_UNLIKELY (*p != ' ' && *p != '\t' && *p != '\n' && *p != '\r'))
+ return FALSE;
+ p++;
}
return TRUE;
Index: GConf2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/GConf2/devel/GConf2.spec,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- GConf2.spec 23 Feb 2009 21:11:53 -0000 1.98
+++ GConf2.spec 4 Mar 2009 04:15:57 -0000 1.99
@@ -1,5 +1,5 @@
%define libxml2_version 2.4.12
-%define orbit2_version 2.8.0
+%define orbit2_version 2.8.0
%define glib2_version 2.14.0
%define dbus_version 1.0.1
%define dbus_glib_version 0.74
@@ -7,7 +7,7 @@
Summary: A process-transparent configuration system
Name: GConf2
Version: 2.25.2
-Release: 2%{?dist}
+Release: 3%{?dist}
License: LGPLv2+
Group: System Environment/Base
Source: http://download.gnome.org/sources/GConf/2.25/GConf-%{version}.tar.bz2
@@ -32,6 +32,7 @@
Requires: /usr/bin/killall
Patch0: GConf-2.18.0.1-reload.patch
+Patch1: gconf-less-work.patch
%description
GConf is a process-transparent configuration database API used to
@@ -67,6 +68,7 @@
%prep
%setup -q -n GConf-%{version}
%patch0 -p1 -b .reload
+%patch1 -p1 -b .less-work
%build
%configure --disable-static --enable-defaults-service
@@ -141,6 +143,9 @@
%{_libdir}/pkgconfig/*
%changelog
+* Tue Mar 3 2009 Matthias Clasen <mclasen at redhat.com> - 2.25.2-2
+- Avoid some gratitious extra work in the markup backend
+
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.25.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
More information about the fedora-extras-commits
mailing list