Closed
Bug 336575
Opened 19 years ago
Closed 19 years ago
Remove mShiftTable from all encoders and decoders that don't use it
Categories
(Core :: Internationalization, defect)
Core
Internationalization
Tracking
()
RESOLVED
FIXED
People
(Reporter: smontagu, Assigned: smontagu)
References
Details
Attachments
(1 file, 1 obsolete file)
319.90 KB,
patch
|
jshin1987
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #220761 -
Flags: review?(jshin1987)
Assignee | ||
Comment 2•19 years ago
|
||
By the way, I didn't version nsIUnicodeDecodeHelper because I'm about to file a bug to deCOMtaminate it: it's only ever used inside uconv and I don't see any reason for it to be an XPCOM interface.
Assignee | ||
Comment 3•19 years ago
|
||
Comment on attachment 220761 [details] [diff] [review]
patch
I need to merge this to bug 356609 anyway, and I think I can do better than this. Right now all table-based encoder/decoders have a shiftTable, and most of them are empty. This makes nsUCSupport and the helpers more compact, but at the cost of adding 12 unused bytes to dozens of individual encoder/decoders. That seems like the wrong trade-off to me.
Attachment #220761 -
Attachment is obsolete: true
Attachment #220761 -
Flags: review?(jshin1987)
Assignee | ||
Comment 4•19 years ago
|
||
It turns out that out of 87 decoders and 108 encoders, only 3 encoders and 1 decoder actually use the shiftTable.
Summary: Remove mShiftTable from nsOneByteDecoderSupport → Remove mShiftTable from all encoders and decoders that don't use it
Assignee | ||
Comment 5•19 years ago
|
||
Attachment #222857 -
Flags: review?(jshin1987)
Assignee | ||
Comment 6•19 years ago
|
||
Comment on attachment 222857 [details] [diff] [review]
patch
>Index: intl/uconv/util/nsUCConstructors.cpp
>+CreateMultiTableEncoder(PRInt32 aTableCount,
>+ uScanClassID * aScanClassArray,
>+ uMappingTable ** aMappingTable,
>+ PRUint32 aMaxLengthFactor,
>+ nsISupports* aOuter,
>+ REFNSIID aIID,
>+ void** aResult)
>+{
>+ return CreateMultiTableEncoder(aTableCount, aScanClassArray,
>+ aMappingTable, aMaxLengthFactor,
>+ aOuter, aIID, aResult);
>+}
>+
Oops, this should be
+ return CreateMultiTableEncoder(aTableCount, aScanClassArray,
+ nsnull,
+ aMappingTable, aMaxLengthFactor,
+ aOuter, aIID, aResult);
I won't attach a new patch for this one line
Comment 7•19 years ago
|
||
Comment on attachment 222857 [details] [diff] [review]
patch
r=jshin
Sorry for the very long delay.
Will you 'sanitize' indentation in unicpriv.h and take cvs blame?
>-PRBool uGenerate( uShiftTable *shift,
>+PRBool uGenerate( uScanClassID scanClass,
> PRInt32* state,
....
>-PRBool uScan( uShiftTable *shift,
>+PRBool uScan( uScanClassID scanClass,
>+ PRInt32 *state,
>+ unsigned char *in,
.....
>+PRBool uGenerateShift( uShiftOutTable *shift,
>+ PRInt32* state,
....
>+PRBool uScanShift( uShiftInTable *shift,
> PRInt32 *state,
> unsigned char *in,
....
Perhaps, it's better to realign the argument list here?
>+MODULE_PRIVATE PRBool uScanShift(
>+ uShiftInTable *shift,
>+ PRInt32* state,
>+ unsigned char *in,
>+ PRUint16 *out,
>+ PRUint32 inbuflen,
>+ PRUint32* inscanlen
>+ );
BTW, while you're touching uscan.c, can you fix a typo ( 'gennerator' has
double n's)? There are two instances. Both are not changed by the patch, but
they're close to lines modified.
http://lxr.mozilla.org/seamonkey/search?string=uSubGennerator
Attachment #222857 -
Flags: review?(jshin1987) → review+
Assignee | ||
Comment 8•19 years ago
|
||
Comment on attachment 222857 [details] [diff] [review]
patch
Thanks for review. I'll pick those nits before checking in.
Attachment #222857 -
Flags: superreview?(roc)
Comment on attachment 222857 [details] [diff] [review]
patch
rs=roc
Attachment #222857 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 10•19 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•