Closed
Bug 315786
Opened 19 years ago
Closed 19 years ago
Make the functions defined in nsEscape.h more useful
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: darin.moz, Assigned: darin.moz)
References
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 1 obsolete file)
3.41 KB,
patch
|
Details | Diff | Splinter Review |
Make the functions defined in nsEscape.h more useful For example, it is a pain to escape/unescape UTF-16 strings. NS_EscapeURL and NS_UnescapeURL all have versions that return nsACString references that helps avoid copying when unnecessary. However, many consumers would be happier with a nsCSubstring reference or a nsCString reference. We can easily support other inline variants on those methods that makes the APIs easier to use.
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Comment 1•19 years ago
|
||
This patch cleans up the string types (dropping the deprecated string class names) and adds versions of NS_EscapeURL that operate on nsCSubstring.
Attachment #202610 -
Flags: review?(cbiesinger)
Comment 2•19 years ago
|
||
Comment on attachment 202610 [details] [diff] [review] v1 patch could use BeginReading() these days, and avoid the temp variable I wonder if making these templates would be a good idea? It'd avoid having all these copies of the function in this file. Oh, and couldn't you make the first argument an nsACString&, now that it has a BeginReading() method?
Attachment #202610 -
Flags: review?(cbiesinger) → review+
Comment 3•19 years ago
|
||
(one that returns a const char*, that is)
Assignee | ||
Comment 4•19 years ago
|
||
Here's the version that I ended up checking in. I realized that my first patch would not work if compiled without MOZ_V1_STRING_ABI.
Attachment #202610 -
Attachment is obsolete: true
Assignee | ||
Comment 5•19 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Keywords: fixed1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•