Closed
Bug 170160
Opened 22 years ago
Closed 22 years ago
s/sprintf/AppendInt/ in layout/xul
Categories
(Core :: XUL, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bratell, Assigned: bratell)
References
Details
Attachments
(1 file)
|
3.49 KB,
patch
|
bryner
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
This is a part of bug 92064. In several places we put up a big char buffer on the stack, call sprintf to fill that buffer with a number as a string and finally convert that buffer to unicode. Faster and smarter is to use AppendInt on a nsAutoString. Patch coming up.
| Assignee | ||
Comment 1•22 years ago
|
||
Here's a patch. Who should I call for a review? Hyatt? The changes are trivial.
| Assignee | ||
Updated•22 years ago
|
Summary: s/sprintf/AppendInt in layout/xul → s/sprintf/AppendInt/ in layout/xul
Comment 2•22 years ago
|
||
Try cc'ing some people who could r= and sr= in addition to hyatt. Heck, I'll sr= the patch right now. /be
Comment 3•22 years ago
|
||
Comment on attachment 100139 [details] [diff] [review] Use AppendInt instead of sprintf Nit: why not append Str and not mess with interCaps when naming the nsAutoString variable: newpos => newposStr, not newPosStr. sr=brendan@mozilla.org with a valid r=. /be
Attachment #100139 -
Flags: superreview+
| Assignee | ||
Comment 4•22 years ago
|
||
I'll make that change before checking in if I get a r=.
| Assignee | ||
Updated•22 years ago
|
Attachment #100139 -
Flags: review?(hyatt)
| Assignee | ||
Comment 5•22 years ago
|
||
Comment on attachment 100139 [details] [diff] [review] Use AppendInt instead of sprintf Trying another reviewer...
Attachment #100139 -
Flags: review?(hyatt) → review?(bryner)
Updated•22 years ago
|
Attachment #100139 -
Flags: review?(bryner) → review+
| Assignee | ||
Comment 7•22 years ago
|
||
Checked in patch.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 8•22 years ago
|
||
+ printf("Current Pos=%s\n",newPosStr.get());
this won't work now, because newPosStr is an nsAutoString, so you'd get back a
PRUnichar*...| Assignee | ||
Comment 9•22 years ago
|
||
That should be fixed in the code I checked in. That said, since it's ifdefed away, it hasn't been put through my compiler.
Comment 10•22 years ago
|
||
ah, indeed. I had only looked at the patch on this bug, not at what was actually checked in.
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•