switch XPIDL from nsAReadableString to const nsAString

RESOLVED FIXED

Status

()

Core
XPCOM
RESOLVED FIXED
17 years ago
16 years ago

People

(Reporter: Jon Smirl, Assigned: jag (Peter Annema))

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 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

Comment 1

17 years ago
reassign all kandrot xpcom bug.
Assignee: kandrot → dougt

Comment 2

16 years ago
jaggernaut, please advise. 
(Assignee)

Comment 3

16 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.

Comment 4

16 years ago
assigning to jag.  (assign back if you want me or someone else to try to get to
this problem)
Assignee: dougt → jaggernaut
(Assignee)

Comment 5

16 years ago
http://lxr.mozilla.org/seamonkey/source/xpcom/typelib/xpidl/xpidl_header.c#665

bugzilla as a "mental note:"
(Assignee)

Comment 6

16 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

16 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

16 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

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

Comment 11

16 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 :-)
For some reason this turned speedracer and bismark orange.
(Assignee)

Comment 13

16 years ago
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.