Closed
Bug 4470
Opened 26 years ago
Closed 25 years ago
Rename PRUnichar to nsUnichar
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
RESOLVED
WONTFIX
M15
People
(Reporter: wtc, Assigned: waterson)
Details
The data type PRUnichar is not defined
by NSPR. Therefore, it should not use
the PR prefix.
PRUnichar is now defined in
mozilla/base/src/nscore.h as follows:
/** ucs2 datatype for 2 byte unicode characters */
typedef PRUint16 PRUcs2;
/** ucs4 datatype for 4 byte unicode characters */
typedef PRUint32 PRUcs4;
#ifdef NS_UCS4
typedef PRUcs4 PRUnichar;
#else
typedef PRUcs2 PRUnichar;
#endif
I suggest that the data types be renamed
as follows:
PRUcs2 ==> nsUcs2
PRUcs4 ==> nsUcs4
PRUnichar ==> nsUnichar
Many people have asked whether the definition
of PRUnichar should be moved to NSPR. I
argue that, because NSPR does not use PRUnichar
nor has any functions that operate on PRUnichar,
it is risky to put the definition of PRUnichar
in NSPR. We may screw up the definition of
PRUnichar without realizing it.
Updated•26 years ago
|
Assignee: scc → dp
Comment 1•26 years ago
|
||
reassigning to dp, since component is XPCOM
Updated•26 years ago
|
Assignee: dp → kipp
Comment 2•26 years ago
|
||
I am not owner of base. Last I knew, kipp owned it.
Reporter | ||
Comment 4•26 years ago
|
||
You can mark the bug resolved-wontfix.
That's fine by me. I can't resolve
this bug because I don't own
mozilla/base/src/nscore.h.
I suggest the bug remain open.
If in a future release of NSPR these data types collide with those in NSPR, the
cost of fixing the problem could be much higher.
Assignee | ||
Comment 6•26 years ago
|
||
How about somebody gets brave and runs this:
for FILE in `find . \( -name \*.cpp -o -name \*.h \) -print`
do
sed 's/PRUnichar/nsUnichar/g' $FILE > x
mv x $FILE
done
Comment 7•26 years ago
|
||
Waterson is a brave hacker, I think.
If he doesn't do it, I'll do it (but I might use perl rather than sed).
/be
Updated•26 years ago
|
Assignee: wtc → waterson
Comment 8•26 years ago
|
||
This ought to be reassigned to a brave hacker. Waterson, if you're overloaded,
try dp; like I said, I'll take it if you guys won't (I think dp gets in line
ahead of me now that base is folded into xpcom).
/be
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M15
Updated•25 years ago
|
QA Contact: beppe → dp
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → WONTFIX
Assignee | ||
Comment 9•25 years ago
|
||
PRUnichar forever!
You need to log in
before you can comment on or make changes to this bug.
Description
•