Closed Bug 512194 Opened 17 years ago Closed 17 years ago

[win64] use pointer-sized int for PtrBits in gfxFont.h

Categories

(Core :: Graphics, defect)

x86_64
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: Mook, Assigned: Mook)

References

()

Details

Attachments

(1 file)

There's one case in gfxFont.h where PtrBits (used to hold pointer-sized things) is typedefed to an unsigned long, which on win64 is smaller than sizeof(void*). The attached patch uses PRUptrdiff instead. (I've been told to use that instead of PRUword on account of the latter being deprecated.) The URL links to at least one case where it's expected to hold pointer-sized things. I'm not sure if gfxFont.h constitutes an (external) API; if yes, this might also need (trivial) sr.
Attachment #396165 - Flags: review?(vladimir)
FYI, there are more... # grep -r PtrBits . |grep typedef ./content/base/src/nsAttrName.h:typedef unsigned long PtrBits; ./content/base/src/nsAttrValue.h:typedef unsigned long PtrBits; ./content/base/src/nsPropertyTable.h:typedef unsigned long PtrBits; ./content/base/src/nsDocument.h: typedef unsigned long PtrBits; ./content/base/src/nsGenericElement.h:typedef unsigned long PtrBits; ./dom/src/base/nsDOMClassInfo.h:typedef unsigned long PtrBits; ./gfx/thebes/public/gfxFont.h: typedef unsigned long PtrBits; ./ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp:typedef unsigned long PtrBits; ./xpcom/ds/nsAtomTable.cpp:typedef PRUword PtrBits; ./xpcom/ds/nsCheapSets.h: typedef unsigned long PtrBits; ./xpcom/ds/nsCheapSets.h: typedef unsigned long PtrBits;
(In reply to comment #1) > FYI, there are more... Is that m-c, or cvs? I don't think /ipc was ever imported. http://hg.mozilla.org/mozilla-central/rev/f939168ee9f4 also appears to have changed nsCheapSets.h. http://mxr.mozilla.org/mozilla-central/search?string=PtrBits&find=&findi=&filter=typedef&hitlimit=&tree=mozilla-central at least finds nothing else.
Oops, that was CVS indeed. Sorry. The rest of m-c looks good, except perhaps the use of PRUword in xpcom.
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: