Closed Bug 58967 Opened 24 years ago Closed 24 years ago

xlib + mathml doesn't compile

Categories

(Core Graveyard :: GFX, defect, P3)

x86
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9

People

(Reporter: dbaron, Assigned: dbaron)

Details

Attachments

(3 files)

Building with --enable-xlib and --enable-mathml doesn't build.  I'll attach
patches that make it so it does.  I haven't yet gotten xlib to run, so I haven't
been able to test these.  However, I think they should be rather uncontroversial
(correct spelling mistake, and pass the correct arguments to functions).

Blizzard, could you review these?  Or does someone else own xlib these days?
For the first patch, does (const PRUnichar *)&aString[start] create a temporary
PRUnichar object and leak it?

For the second patch, wouldn't it be better to do something like:

(Window)0 instead of (Window)nsnull?  This is C++ after all.
> For the first patch, does (const PRUnichar *)&aString[start] create a temporary
> PRUnichar object and leak it?

No, it was just a cast.  But now that you mention it, I'm not sure why it was
there, since I'd think an index into a |const PRUnichar *| would give a |const
PRUnichar|, whose address would then be a |const PRUnichar *|.  But maybe the
last is instead |const PRUnichar * const|, and this was an old-style cast acting
as a const_cast?  If I take it out (it was there before, and it's there in the
GTK code), my compiler (gcc "2.96") doesn't complain, but might others?

Anyway, PRUnichar is just |short int|, and anyway temporary objects created by
implicit construction shouldn't leak.

> For the second patch, wouldn't it be better to do something like:
> (Window)0 instead of (Window)nsnull?  This is C++ after all.

OK, I'll change it.  nsnull is always 0, and I was under the impression Window
was typedef'd to be some pointer type underneath all of it, but perhaps not.
It's an unsigned int.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9
a=blizzard.  Feel free to check it in.
I think cls just checked in equivalent patches for the MathML changes...
Remaining patch checked in 2000-12-02 07:56 -0800.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Marking verified per last comments.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: