g_pattern_match usage in gtkitemfactory
- From: "Matthias Clasen" <matthiasc poet de>
- To: <gtk-devel-list gnome org>
- Subject: g_pattern_match usage in gtkitemfactory
- Date: Wed, 10 Oct 2001 14:39:44 +0200
In gtkitemfactory.c, I find
l.1330: pspec_separator = g_pattern_spec_new ("*<separator>*");
pspec_check = g_pattern_spec_new ("*<check>*");
l.1360: if (g_pattern_match_string (pspec_separator, path))
entry.item_type = "<Separator>"; else if (!g_pattern_match_string
(pspec_check, path)) entry.item_type = NULL;
Wouldn't it be much simpler and more correct to use strstr ? if (strstr
(path, "<separator>")) entry.item_type = "<Separator>";else if (!strstr
(path, "<check>")) entry.item_type = NULL;
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]