Closed
Bug 226123
Opened 22 years ago
Closed 22 years ago
Add configurable function list to DRefTool and limit |new| to c++
Categories
(Core Graveyard :: Tracking, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
Details
Attachments
(1 file)
13.20 KB,
patch
|
dwitte
:
review+
|
Details | Diff | Splinter Review |
The original list of functions didn't scale well.
You had to manually hack the list, which was annoying, especially when each
module has its own strdup (or three in the case of libical). I'm also fixing a
monitor glitch per dbaron in this patch and improving the html output.
Attachment #135834 -
Flags: review?(dwitte)
Comment 2•22 years ago
|
||
Comment on attachment 135834 [details] [diff] [review]
configurable function list, |new| for cpp only
>Index: main.cpp
>===================================================================
>@@ -822,10 +834,12 @@
>
> default:
> fprintf(stderr,
>- "Usage: dreftool [-h] [-d sourcepath]\n"
>+ "Usage: dreftool [-h] [-s] [-f wordlist] [-d sourcepath]\n"
> "-d path to root of source tree\n"
>+ "-f list of functions which can return null\n"
"file containing list of functions..." ?
>+ "-h emit as HTML\n"
> "-s sloppy mode no warnings if member variables are used unsafe\n"
add a colon after 'mode'.
>@@ -838,24 +852,80 @@
>+ if (!gWatchFile) {
>+ const char* wordList[] = {
>+ "malloc",
>+ "calloc",
>+ "PR_Malloc",
>+ "PR_Calloc",
>+ "ToNewCString",
>+ "ToNewUTF8String",
>+ "ToNewUnicode",
>+ "UTF8ToNewUnicode",
>+ 0
>+ };
do we really need this hardcoded list if there is no file? simpler just to
check if the specified file doesn't exist, and bail?
>+ if (NS_FAILED(myWatchList.mTableCPP.Put(NS_LITERAL_CSTRING("new"))))
>+ return -1;
maybe you want to extend this so the c++ functions are in the file too? maybe
with just a newline separating the c and c++ names.
myCfunction1
myCfunction2
...
myCfunction3
myC++function1
myC++function2
...
myC++function3
r=dwitte
Attachment #135834 -
Flags: review?(dwitte) → review+
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•