Thanks for the patch!   Using %p is the right thing here.  It has been
committed in V8 bleeding_edge revision 1128.  :-)

Do you have a build setup where this is a problem?  If you do, we
would be interested in more details of the setup so we can test
against it.

Cheers,    -- Mads

On Wed, Jan 21, 2009 at 7:10 PM, Jeff Bailey <[email protected]> wrote:
>
> Hi!  There seem to be a number of places that assume that a pointer is
> the same size as an int (or an ILP32 system in general).  Will fixes
> like this be accepted?
>
> 2009-01-20  Jeff Bailey <[email protected]>
>
>        * src/checks.h: Use %p modifier for displaying pointers.
>
> Index: src/checks.h
> ===================================================================
> --- src/checks.h        (revision 1112)
> +++ src/checks.h        (working copy)
> @@ -136,9 +136,9 @@
>                                      void* value) {
>   if (expected != value) {
>     V8_Fatal(file, line,
> -             "CHECK_EQ(%s, %s) failed\n#   Expected: %i\n#   Found:
> %i",
> +             "CHECK_EQ(%s, %s) failed\n#   Expected: %p\n#   Found:
> %p",
>              expected_source, value_source,
> -             reinterpret_cast<int>(expected), reinterpret_cast<int>
> (value));
> +             expected, value);
>   }
>  }
>
> @@ -150,8 +150,8 @@
>                                         const char* value_source,
>                                         void* value) {
>   if (expected == value) {
> -    V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n#   Value: %i",
> -             expected_source, value_source, reinterpret_cast<int>
> (value));
> +    V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n#   Value: %p",
> +             expected_source, value_source, value);
>   }
>  }
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to