WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
116528
[WINCE] Add wtf_bsearch()
https://bugs.webkit.org/show_bug.cgi?id=116528
Summary
[WINCE] Add wtf_bsearch()
Patrick R. Gansterer
Reported
2013-05-21 03:20:21 PDT
[WINCE] Add wtf_bsearch()
Attachments
Patch
(2.23 KB, patch)
2013-05-21 03:25 PDT
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Patrick R. Gansterer
Comment 1
2013-05-21 03:25:13 PDT
Created
attachment 202403
[details]
Patch
WebKit Commit Bot
Comment 2
2013-05-21 03:26:36 PDT
Attachment 202403
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WTF/ChangeLog', u'Source/WTF/wtf/StdLibExtras.h']" exit_code: 1 Source/WTF/wtf/StdLibExtras.h:267: wtf_bsearch is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 3
2013-05-21 08:52:48 PDT
Comment on
attachment 202403
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=202403&action=review
>> Source/WTF/wtf/StdLibExtras.h:267 >> +inline void* wtf_bsearch(const void* key, const void* base, size_t count, size_t size, int (*compare)(const void *, const void *)) > > wtf_bsearch is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4]
This should just be named bsearch. There’s no value to naming it wtf_bsearch and then redirecting with a macro. There may be some reason for this idiom elsewhere, but not here. It’s strange to inline this. It should be just a normal non-inline function, but I suppose you inlined it because you don’t know of a good .cpp file to put it in.
Patrick R. Gansterer
Comment 4
2013-05-21 08:57:11 PDT
(In reply to
comment #3
)
> (From update of
attachment 202403
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=202403&action=review
> > >> Source/WTF/wtf/StdLibExtras.h:267 > >> +inline void* wtf_bsearch(const void* key, const void* base, size_t count, size_t size, int (*compare)(const void *, const void *)) > > > > wtf_bsearch is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] > > This should just be named bsearch. There’s no value to naming it wtf_bsearch and then redirecting with a macro. There may be some reason for this idiom elsewhere, but not here.
There is a problem when it's linked again an application which already provides an implementation of bsearch (not uncommon for WinCE apps). But we can move this problem to the application developer if it's a blocker.
> It’s strange to inline this. It should be just a normal non-inline function, but I suppose you inlined it because you don’t know of a good .cpp file to put it in.
Yes, but I can add a StdLibExtras.cpp if you like...
WebKit Commit Bot
Comment 5
2013-05-26 18:25:38 PDT
Comment on
attachment 202403
[details]
Patch Clearing flags on attachment: 202403 Committed
r150729
: <
http://trac.webkit.org/changeset/150729
>
WebKit Commit Bot
Comment 6
2013-05-26 18:25:40 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug