Closed
Bug 164633
Opened 24 years ago
Closed 24 years ago
nsTextFormatter should accept nsAString as well
Categories
(Core :: XPCOM, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.2alpha
People
(Reporter: alecf, Assigned: alecf)
Details
(Whiteboard: fix in hand)
Attachments
(1 file)
|
4.16 KB,
patch
|
dougt
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
ok, one more minor thing I was working on..
there are a lot of places where we're using nsTextFormatter and allocate a
temporary string then throw it away again. nsTextFormatter needs another
function, nsTextFormatter::ssprintf which prints to an nsAString..
patch forthcoming
| Assignee | ||
Comment 1•24 years ago
|
||
a few minor bits about this:
1) I #if 0'ed out the func stuff in the SprintfStateStr because it confused me
as to whether those functions were used or not. There is other #if 0'ed code
that allows you to plug in your own "grow" callback function, that I can either
rip out or leave #if 0'ed
2) I try to be smart about flatstring stuff, because internally the
SprintfStateStr is supposed to be holding a reference to a writable region of
memory. I need an nsAFlatString to write to. I use the same check as
PromiseFlatString() has.
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: fix in hand
Target Milestone: --- → mozilla1.2alpha
Comment 2•24 years ago
|
||
Comment on attachment 96681 [details] [diff] [review]
add ssprintf/vssprintf to nsTextFormatter
rip out the #if 0 stuff. we have cvs for file history.
Are you sure you want a reinterpret cast to void*? Why won't a static cast
work?
r=dougt
Attachment #96681 -
Flags: review+
| Assignee | ||
Comment 3•24 years ago
|
||
by george, you're right. I wish I could keep C++ casts straight :)
| Assignee | ||
Comment 5•24 years ago
|
||
oops! fixed in my tree to be "n ? n - 1 : n;" - I don't quite understand the
logic behind it, but it is consistent with the other v*sprintf methods.
Comment 6•24 years ago
|
||
Comment on attachment 96681 [details] [diff] [review]
add ssprintf/vssprintf to nsTextFormatter
sr=darin
Attachment #96681 -
Flags: superreview+
| Assignee | ||
Comment 7•24 years ago
|
||
landed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•