[Pidgin] #7790: purple_strequal

Pidgin trac at pidgin.im
Mon Dec 15 13:38:20 EST 2008


#7790: purple_strequal
------------------------+---------------------------------------------------
 Reporter:  darkrain42  |        Owner:  grim     
     Type:  patch       |       Status:  new      
Milestone:  2.6.0       |    Component:  libpurple
  Version:              |   Resolution:           
 Keywords:              |  
------------------------+---------------------------------------------------

Comment(by darkrain42):

 It would probably be the most use in the XMPP prpl, where there a large
 number of checks for whether an attribute or xmlns matches a constant
 string (see, e.g., #6972)

 It's also a little harder to misread when compared to strcmp (maybe? see
 the patch parts in savedstatus.c and the last few in prefs.c)

 In fact, the vast majority of the uses of strcmp() in libpurple/*.c are
 actually tests for equality. There are a small few that seem to mostly be
 functions that are attempting to sort lists of strings or
 g_(s)?list_find_custom usages. Roughg statistics are that, before the
 patch, there are 222 instances of strcmp and afterward there are 208
 instances of purple_strequal and 27 instances of strcmp.

 Also, IIRC, khc indicated he might yell at me if I just submitted a
 purple_strcmp0 ;)

-- 
Ticket URL: <http://developer.pidgin.im/ticket/7790#comment:4>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list