Closed
Bug 131899
Opened 22 years ago
Closed 22 years ago
remove nsA{Readable,Writable}{,C}String
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla1.0
People
(Reporter: dbaron, Assigned: dbaron)
Details
Attachments
(2 files, 1 obsolete file)
22.95 KB,
patch
|
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
173.71 KB,
application/x-gzip
|
scc
:
review+
jag+mozilla
:
superreview+
asa
:
approval+
|
Details |
We should remove nsA{Readable,Writable}{,C}String in favor of {const ,}nsA{,C}String. This will reduce confusion since there will be fewer string classes, and it's been the plan for some time. It's just never been done. So I did most of the work using sed. I used the script: find mozilla -name "*".cpp -o -name "*".h -o -name "*".idl | while read FILENAME; do sed -f mass-change.sed $FILENAME > $FILENAME.$$.tmp mv $FILENAME.$$.tmp $FILENAME done where mass-change.sed contained: s/const nsAReadableString/const nsAString/g s/nsAWritableString/nsAString/g s/const nsAReadableCString/const nsACString/g s/nsAWritableCString/nsACString/g s/nsAReadableString/const nsAString/g s/nsAReadableCString/const nsACString/g s/"const nsAString\.h"/"nsAString\.h"/ I then manually redid all the changes within string/, and manually cleaned various things up in the following files: + xpcom/ds/nsIAtom.idl + netwerk/cache/src/nsCache.cpp + netwerk/protocol/about/src/nsAboutRedirector.cpp + extensions/transformiix/source/xslt/txMozillaXMLOutput.h + content/xsl/document/src/nsXSLContentSink.cpp + htmlparser/src/nsDTDUtils.h htmlparser/src/nsHTMLTags.cpp + embedding/components/windowwatcher/src/nsPrompt.cpp A |cvs diff -u| of this tree yielded a 1.3MB file that touches 647 files.
Assignee | ||
Comment 1•22 years ago
|
||
Assignee | ||
Comment 2•22 years ago
|
||
(gzipped. Too bad bugzilla doesn't have a way to enter the 'Content-Encoding' for attachments as well.)
Assignee | ||
Comment 3•22 years ago
|
||
Don't review the complete diff yet. I'll attach a human-corrected version later.
Comment 4•22 years ago
|
||
Comment on attachment 74884 [details] [diff] [review] diff of only the "interesting" files mentioned above sr=jag
Attachment #74884 -
Flags: superreview+
Assignee | ||
Comment 5•22 years ago
|
||
Attachment #74885 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.0
Comment 6•22 years ago
|
||
Comment on attachment 74905 [details]
complete patch, corrected
sr=jag
Attachment #74905 -
Flags: superreview+
Assignee | ||
Comment 7•22 years ago
|
||
By far the bulk of these changes hit content, editor, accessible, extensions/xmlextras, and htmlparser (in that order, by number of files), so cc:ing some people who work on that code in case this is a particularly bad time to do this.
Comment 8•22 years ago
|
||
This is fine with editor folks.
Comment 9•22 years ago
|
||
Fine with accessibility folks.
Comment 10•22 years ago
|
||
Comment on attachment 74905 [details]
complete patch, corrected
r=scc
Attachment #74905 -
Flags: review+
Comment 11•22 years ago
|
||
Comment on attachment 74905 [details]
complete patch, corrected
a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #74905 -
Flags: approval+
Assignee | ||
Comment 12•22 years ago
|
||
Comment on attachment 74905 [details]
complete patch, corrected
This patch has a mistake in
mozilla/extensions/python/xpcom/src/VariantUtils.cpp which can be fixed by the
change:
-#include <nsAReadableString.h>
-#include <nsAWritableString.h>
-+#include <const nsAString.h>
+#include <nsAString.h>
Comment 13•22 years ago
|
||
Are you guys planning on changing what is emitted by the xpidl compiler?
Comment 14•22 years ago
|
||
Ah, foolish me. I see that was done months ago.
Assignee | ||
Comment 15•22 years ago
|
||
Fix checked in, 2002-03-23.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•