[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-devel-list
Subject:    Re: [Mono-devel-list] Correct int type to hold a pointer?
From:       Paolo Molaro <lupus () ximian ! com>
Date:       2003-05-22 17:08:09
Message-ID: 20030522170809.GA8467 () debian ! org
[Download RAW message or body]

On 05/20/03 Bernie Solomon wrote:
> What is the correct int type to use which is big enough to hold a pointer.
> As far as I can tell glib does not have a type like that, (u)intptr_t in
> inttypes.h is the standard but so far this is not included in any other .c
> file so I am not sure it can be used. There is mono_i and mono_u but they
> are only inside interpreter and I am not sure this can/should be included in
> metadata files. My initial need is to fix the cast inside dword_align in
> metadata.c. I could of course use #if SIZEOF_VOID_P tests but that is always
> uglier.

unsigned long should work on all the sane platforms (ie not including
64 bit windows systems, I heard).
I'd go with the #if in dword_align.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic