Closed Bug 69872 Opened 24 years ago Closed 24 years ago

[API] work on |nsDependentC?String|

Categories

(Core :: XPCOM, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.0

People

(Reporter: scc, Assigned: scc)

References

Details

Attachments

(1 file)

Specific tasks: - rename to |nsLocalString| (is this the best name) - make |Rebind|able, a la |nsSlidingSubstring| we'll keep |NS_LITERAL_STRING| with the same name.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
and inherit from a common flat class that the converting classes can also inherit from ... making use of |NS_LITERAL_STRING| a little smoother
Priority: -- → P2
Depends on: 70075
Depends on: 63923
Blocks: 28221
Blocks: 46892
No longer blocks: 46892
Blocks: 46892
Target Milestone: mozilla0.9 → mozilla0.8.1
much of this has been checked in on the STRING_081_BRANCH; when the branch is merged into the trunk, I'll close this bug
(mass change) didn't get these in for target milestone mozilla0.8.1 but they are very close. Moving all to mozilla0.9.
Target Milestone: mozilla0.8.1 → mozilla0.9
Blocks: 73786
Fixed the name and other things, but it's not quite re-bindable yet. Leaving this bug open.
Blocks: 73009
No longer blocks: 73786
These are the 0.9 bugs that didn't make it, and that I intend to fix in 0.9.1
Target Milestone: mozilla0.9 → mozilla0.9.1
Summary: work on |nsLiteralString| → [API] work on |nsLiteralString|
re-targeting milestones, starting from a clean slate
Target Milestone: mozilla0.9.1 → ---
All planned string API fixes need to be in by mozilla1.0.
Target Milestone: --- → mozilla1.0
These classes have been renamed as per bug #75220. Changing summary accordingly.
Summary: [API] work on |nsLiteralString| → [API] work on |nsDependentC?String|
Keywords: approval, patch, review
scc, what do you mean with "immutable" when you justify making the copy-assignment operator private? That comment just looks a bit odd, since one can change (mutate) the object through |Rebind|. Other than that, r=jag.
|nsDependentC?String| is like a pointer to |const|, rather than a |const|-pointer. Sure, you can make it point to some other buffer ... but you can't make changes within the buffer it points to through _it_. Perhaps a better analogy is a reference. Assignment into a reference makes changes in the thing the reference is bound to, it doesn't rebind the reference itself. Assignment into _any_ of the strings (at least conceptually) makes changes within the characters that string is managing. So if you have a buffer, make an |nsDependentC?String| point to it, and then assign another string into your dependent string, at least conceptually, were this allowed, I would need to write those new characters into the buffer the dependent string was managing. Someday, I may even make |nsDependentC?String| do this, or make a new class that does. This is why |Rebind| is distinct. This is the same as it is in |nsSlidingSubstring|, and was unchanged by this patch. Does this make sense?
Perfect sense (the "Doh! Why didn't I see it like that the first time?" kind). r=jag.
sr=jst
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: