Closed Bug 97238 Opened 23 years ago Closed 23 years ago

switch XPIDL from nsAReadableString to const nsAString

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jonsmirl, Assigned: jag+mozilla)

Details

Attachments

(1 file)

> nsAReadbleString.h/nsAwritableString.h. I guess the new plan is to tell
> readable from writable with the const qualifier. Should the XPIDL compiler
> be changed to reflect this?

Funny, i noticed the same thing the other day.

It should be changed from:

const nsAReadableString & foo
to
const nsAString& foo

and

nsAWritableString & foo
to
nsAString& foo

--pete collins
reassign all kandrot xpcom bug.
Assignee: kandrot → dougt
jaggernaut, please advise. 
Yes, I think it should. I don't think there should be any problem (since
nsAReadableString is typedef'ed to const nsAString, other than perhaps someone
reading the generated .h and not quite understanding the difference in it (const
nsAString&) and the implementation (const nsAReadableString&). Though at some
point I'll probably sweep the tree and change it all.
assigning to jag.  (assign back if you want me or someone else to try to get to
this problem)
Assignee: dougt → jaggernaut
Comment on attachment 48741 [details] [diff] [review]
Emit nsAString instead of nsAReadableString and nsAWritableString

sr=shaver, now that jag held my hand through the new AString/readable/writable mappings.
Attachment #48741 - Flags: superreview+
Here's why this should work flawlessly:

typedef const nsAString   nsAReadableString;
typedef       nsAString   nsAWritableString;

(see nsAReadableString.h and nsAWritableString.h)
Status: NEW → ASSIGNED
Comment on attachment 48741 [details] [diff] [review]
Emit nsAString instead of nsAReadableString and nsAWritableString

r=cls
Attachment #48741 - Flags: review+
And checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Btw, I may end up doing a nsAReadableString/nsAWritableString -> nsAString tree
sweep at some point in the future. Not dealing with that in this bug :-)
For some reason this turned speedracer and bismark orange.
Looking into it.
It looks like clobbering bismark fixed the problems.  I have no idea why, though.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: