Closed
Bug 785321
Opened 12 years ago
Closed 12 years ago
Replace PRUptrdiff with uintptr_t, prtdiff_t or etc
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: m_kato, Assigned: m_kato)
References
Details
Attachments
(1 file)
14.24 KB,
patch
|
ehsan.akhgari
:
review+
jrmuizel
:
review+
|
Details | Diff | Splinter Review |
bug 579517 is fixed, but Gecko still uses PRUptrdiff. We should replace it with uintptr_t, ptrdiff_t or etc.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee: nobody → m_kato
Attachment #654947 -
Flags: review?(ehsan)
Assignee | ||
Comment 2•12 years ago
|
||
See bug 478190 why we use PRUptrdiff for PtrBits.
Comment 3•12 years ago
|
||
Comment on attachment 654947 [details] [diff] [review]
fix
Review of attachment 654947 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/qcms/qcmstypes.h
@@ +28,5 @@
> #ifdef __OS2__
> /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
> #include <stdlib.h>
> #elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED)
> +typedef unsigned long uintptr_t;
I'm not very sure if this change is correct because the size of long is not always the same as the size of a pointer. Also the code above it doesn't make much sense to me. I've asked Jeff to review this part.
Attachment #654947 -
Flags: review?(jmuizelaar)
Attachment #654947 -
Flags: review?(ehsan)
Attachment #654947 -
Flags: review+
Updated•12 years ago
|
Attachment #654947 -
Flags: review?(jmuizelaar) → review+
Comment 4•12 years ago
|
||
Target Milestone: --- → mozilla18
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 6•12 years ago
|
||
Comment on attachment 654947 [details] [diff] [review]
fix
Review of attachment 654947 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/ycbcr/convert.patch
@@ +321,5 @@
> // after the end for SSE2 version.
> uint8 yuvbuf[16 + kFilterBufferSize * 3 + 16];
> uint8* ybuf =
> - reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
> ++ reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
I'm not missing anything here, am I?
Comment 7•12 years ago
|
||
(In reply to :Ms2ger from comment #6)
> Comment on attachment 654947 [details] [diff] [review]
> fix
>
> Review of attachment 654947 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: gfx/ycbcr/convert.patch
> @@ +321,5 @@
> > // after the end for SSE2 version.
> > uint8 yuvbuf[16 + kFilterBufferSize * 3 + 16];
> > uint8* ybuf =
> > - reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
> > ++ reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
>
> I'm not missing anything here, am I?
It is not at all clear what you're asking here!
Comment 8•12 years ago
|
||
I guess he's asking why exactly the same line appears in the diff.
> - reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
>-+ reinterpret_cast<uint8*>(reinterpret_cast<PRUptrdiff>(yuvbuf + 15) & ~15);
>++ reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
This diff line itself can be removed from convert.patch.
Comment 9•12 years ago
|
||
Ah, I see! I removed the entire hunk from convert.patch:
https://hg.mozilla.org/integration/mozilla-inbound/rev/14eac84d5ce6
Comment 10•12 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•