Closed
Bug 269054
Opened 20 years ago
Closed 11 years ago
Allow a nsString to be used as a nsDependentSubstring and vice-versa
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: bryner, Unassigned)
Details
See bug 268932 for details... we'd like to be able to use a single string member to hold a DependentSubstring or a buffer that it owns. There's no way to do this currently without weird placement-new hacks to initialize the nsDependentSubstring.
Comment 1•20 years ago
|
||
How about something like this: class nsTSubstring { void AssignDependent(const nsTSubstring& aStr); }; We may wish to create variations on this so that one does not need to construct a Substring in order to call this method. If we provide a method like this: class nsTSubstring { void AssignDependent(const char_type* aData, size_type aDataLen); }; then, the question becomes: is the data null-terminated? And, perhaps we'd be tempted to add a boolean parameter after aDataLen. The first version avoids this problem since the null-terminated'ness is inherited from aStr. Hmm...
Updated•18 years ago
|
Assignee: darin → nobody
QA Contact: xpcom
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•