GNOME Bugzilla – Bug 518160
replace two g_strdup_printf calls in GBookmarkFile
Last modified: 2008-03-22 17:11:03 UTC
While parsing a file GBookmarkFile calls a function is_element_full. This function merges 4 strings into 2 strings and checks them for equality. The merger is done using two g_strdup_printf calls. The following patch removes the g_strdup_printf calls and simply compares the corresponding string parts.
Created attachment 105799 [details] [review] described patch This patch does as told above. It avoids the costly printf calls.
committed to trunk. 2008-03-22 Emmanuele Bassi <ebassi@gnome.org> Bug 518160 - replace two g_strdup_printf calls in GBookmarkFile * glib/gbookmarkfile.c (is_element_full): Compare the fragments instead of building two strings; this avoids two g_strdup_printf() per namespaced element enountered. (#518160, Felix Riemann)