sourcehook/generate/sh_memfuncinfo.hxx
changeset 61 f9b4e9ded36d
parent 59 8edcba00a103
child 62 90513b7e3d99
     1.1 --- a/sourcehook/generate/sh_memfuncinfo.hxx	Thu May 05 14:00:08 2005 +0000
     1.2 +++ b/sourcehook/generate/sh_memfuncinfo.hxx	Thu May 05 14:43:40 2005 +0000
     1.3 @@ -54,16 +54,16 @@
     1.4  
     1.5  # if SH_COMP == SH_COMP_GCC
     1.6  
     1.7 -	template<> struct MFI_Impl<8>   // All of these have size==8
     1.8 +	template<> struct MFI_Impl<2*SH_PTRSIZE>   // All of these have size==8/16
     1.9  	{
    1.10  		struct GCC_MemFunPtr
    1.11  		{
    1.12  			union
    1.13  			{
    1.14  				void *funcadr;				// always even
    1.15 -				int vtable_index_plus1;		//  = vindex+1, always odd
    1.16 +				intptr_t vtable_index_plus1;		//  = vindex+1, always odd
    1.17  			};
    1.18 -			int delta;
    1.19 +			intptr_t delta;
    1.20  		};
    1.21  		template<class MFP> static inline void GetFuncInfo(MFP mfp, MemFuncInfo &out)
    1.22  		{
    1.23 @@ -71,7 +71,7 @@
    1.24  			out.thisptroffs = mfp_detail->delta;
    1.25  			if (mfp_detail->vtable_index_plus1 & 1)
    1.26  			{
    1.27 -				out.vtblindex = (mfp_detail->vtable_index_plus1 - 1) / 4;
    1.28 +				out.vtblindex = (mfp_detail->vtable_index_plus1 - 1) / SH_PTRSIZE;
    1.29  				out.vtbloffs = 0;
    1.30  				out.isVirtual = true;
    1.31  			}
    1.32 @@ -147,7 +147,7 @@
    1.33  		}
    1.34  	}
    1.35  
    1.36 -	template<> struct MFI_Impl<4>   // simple ones
    1.37 +	template<> struct MFI_Impl<1*SH_PTRSIZE>   // simple ones
    1.38  	{
    1.39  		template<class MFP> static inline void GetFuncInfo(MFP mfp, MemFuncInfo &out)
    1.40  		{
    1.41 @@ -158,7 +158,7 @@
    1.42  		}
    1.43  	};
    1.44  
    1.45 -	template<> struct MFI_Impl<8>   // more complicated ones!
    1.46 +	template<> struct MFI_Impl<2*SH_PTRSIZE>   // more complicated ones!
    1.47  	{
    1.48  		struct MSVC_MemFunPtr2
    1.49  		{
    1.50 @@ -175,7 +175,7 @@
    1.51  	};
    1.52  
    1.53  	// By Don Clugston, adapted
    1.54 -	template<> struct MFI_Impl<12>   // WOW IT"S GETTING BIGGER OMGOMOGMG
    1.55 +	template<> struct MFI_Impl<3*SH_PTRSIZE>   // WOW IT"S GETTING BIGGER OMGOMOGMG
    1.56  	{
    1.57  		class __single_inheritance GenericClass;
    1.58  		class GenericClass {};
    1.59 @@ -228,7 +228,7 @@
    1.60  	// unknown_inheritance classes go here 
    1.61  	// This is probably the ugliest bit of code I've ever written. Look at the casts!
    1.62  	// There is a compiler bug in MSVC6 which prevents it from using this code.
    1.63 -	template<> struct MFI_Impl<16>   // THE BIGGEST ONE!!!1GABEN
    1.64 +	template<> struct MFI_Impl<4*SH_PTRSIZE>   // THE BIGGEST ONE!!!1GABEN
    1.65  	{
    1.66  		template<class MFP> static inline void GetFuncInfo(MFP mfp, MemFuncInfo &out)
    1.67  		{