switch XPIDL from nsAReadableString to const nsAString

RESOLVED FIXED

Status

()

RESOLVED FIXED
18 years ago
18 years ago

People

(Reporter: jonsmirl, Assigned: jag+mozilla)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
> 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. 
(Assignee)

Comment 3

18 years ago
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
(Assignee)

Comment 6

18 years ago
Created attachment 48741 [details] [diff] [review]
Emit nsAString instead of nsAReadableString and nsAWritableString
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+
(Assignee)

Comment 8

18 years ago
Here's why this should work flawlessly:

typedef const nsAString   nsAReadableString;
typedef       nsAString   nsAWritableString;

(see nsAReadableString.h and nsAWritableString.h)
Status: NEW → ASSIGNED

Comment 9

18 years ago
Comment on attachment 48741 [details] [diff] [review]
Emit nsAString instead of nsAReadableString and nsAWritableString

r=cls
Attachment #48741 - Flags: review+
(Assignee)

Comment 10

18 years ago
And checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 11

18 years ago
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 :-)
(Assignee)

Comment 13

18 years ago
Looking into it.
You need to log in before you can comment on or make changes to this bug.