1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-30 19:52:17 +01:00

Removed old g_Genc stuff and fixed GenContext::Equal

--HG--
branch : hookman_autogen
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/branches/hookman_autogen%40556
This commit is contained in:
Pavol Marko 2007-11-10 16:32:16 +00:00
parent 92c795e830
commit 926a23d0bd
4 changed files with 4 additions and 19 deletions

View File

@ -48,8 +48,8 @@ namespace SourceHook
}
GenContext::GenContext(const ProtoInfo *proto, int vtbl_offs, int vtbl_idx, ISourceHook *pSHPtr)
: m_GeneratedPubFunc(NULL), m_Proto(proto), m_VtblOffs(vtbl_offs), m_VtblIdx(vtbl_idx), m_SHPtr(pSHPtr),
m_pHI(NULL), m_HookfuncVfnptr(NULL), m_RegCounter(0)
: m_GeneratedPubFunc(NULL), m_OrigProto(proto), m_Proto(proto), m_VtblOffs(vtbl_offs),
m_VtblIdx(vtbl_idx), m_SHPtr(pSHPtr), m_pHI(NULL), m_HookfuncVfnptr(NULL), m_RegCounter(0)
{
m_pHI = new void*;
m_HookfuncVfnptr = new void*;
@ -1664,7 +1664,7 @@ namespace SourceHook
bool GenContext::Equal(const CProto &proto, int vtbl_offs, int vtbl_idx)
{
return (m_Proto.ExactlyEqual(proto) && m_VtblOffs == vtbl_offs && m_VtblIdx == vtbl_idx);
return (m_OrigProto.ExactlyEqual(proto) && m_VtblOffs == vtbl_offs && m_VtblIdx == vtbl_idx);
}
bool GenContext::Equal(HookManagerPubFunc other)

View File

@ -159,6 +159,7 @@ namespace SourceHook
HookManagerPubFunc m_GeneratedPubFunc;
CProto m_OrigProto; // original passed-in prototype
CProto m_Proto;
int m_VtblOffs;
int m_VtblIdx;

View File

@ -629,8 +629,6 @@ std::ostream& operator <<(std::ostream &os,const ParamState6<0, p1, p2, p3, p4,
SourceHook::PassInfo::V2Info paraminfos2_##id[0+1]; \
SourceHook::ProtoInfo protoinfo_##id = { 0, {0, 0, 0}, paraminfos_##id, \
SourceHook::ProtoInfo::CallConv_ThisCall, __SH_EPI, paraminfos2_##id }; \
\
CAutoReleaseHookMan g_Genc_ad##id(NULL);
#define THGM_SETUP_PI0(id) \
void setuppi_##id() \
@ -836,8 +834,6 @@ std::ostream& operator <<(std::ostream &os,const ParamState6<0, p1, p2, p3, p4,
SourceHook::PassInfo::V2Info paraminfos2_##id[1+1]; \
SourceHook::ProtoInfo protoinfo_##id = { 1, {0, 0, 0}, paraminfos_##id, \
SourceHook::ProtoInfo::CallConv_ThisCall, __SH_EPI, paraminfos2_##id }; \
\
CAutoReleaseHookMan g_Genc_ad##id(NULL);
#define THGM_SETUP_PI1(id, p1_type, p1_passtype, p1_flags) \
void setuppi_##id() \
@ -1043,8 +1039,6 @@ std::ostream& operator <<(std::ostream &os,const ParamState6<0, p1, p2, p3, p4,
SourceHook::PassInfo::V2Info paraminfos2_##id[2+1]; \
SourceHook::ProtoInfo protoinfo_##id = { 2, {0, 0, 0}, paraminfos_##id, \
SourceHook::ProtoInfo::CallConv_ThisCall, __SH_EPI, paraminfos2_##id }; \
\
CAutoReleaseHookMan g_Genc_ad##id(NULL);
#define THGM_SETUP_PI2(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags) \
void setuppi_##id() \
@ -1250,8 +1244,6 @@ std::ostream& operator <<(std::ostream &os,const ParamState6<0, p1, p2, p3, p4,
SourceHook::PassInfo::V2Info paraminfos2_##id[3+1]; \
SourceHook::ProtoInfo protoinfo_##id = { 3, {0, 0, 0}, paraminfos_##id, \
SourceHook::ProtoInfo::CallConv_ThisCall, __SH_EPI, paraminfos2_##id }; \
\
CAutoReleaseHookMan g_Genc_ad##id(NULL);
#define THGM_SETUP_PI3(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags, p3_type, p3_passtype, p3_flags) \
void setuppi_##id() \
@ -1457,8 +1449,6 @@ std::ostream& operator <<(std::ostream &os,const ParamState6<0, p1, p2, p3, p4,
SourceHook::PassInfo::V2Info paraminfos2_##id[4+1]; \
SourceHook::ProtoInfo protoinfo_##id = { 4, {0, 0, 0}, paraminfos_##id, \
SourceHook::ProtoInfo::CallConv_ThisCall, __SH_EPI, paraminfos2_##id }; \
\
CAutoReleaseHookMan g_Genc_ad##id(NULL);
#define THGM_SETUP_PI4(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags, p3_type, p3_passtype, p3_flags, p4_type, p4_passtype, p4_flags) \
void setuppi_##id() \
@ -1664,8 +1654,6 @@ std::ostream& operator <<(std::ostream &os,const ParamState6<0, p1, p2, p3, p4,
SourceHook::PassInfo::V2Info paraminfos2_##id[5+1]; \
SourceHook::ProtoInfo protoinfo_##id = { 5, {0, 0, 0}, paraminfos_##id, \
SourceHook::ProtoInfo::CallConv_ThisCall, __SH_EPI, paraminfos2_##id }; \
\
CAutoReleaseHookMan g_Genc_ad##id(NULL);
#define THGM_SETUP_PI5(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags, p3_type, p3_passtype, p3_flags, p4_type, p4_passtype, p4_flags, p5_type, p5_passtype, p5_flags) \
void setuppi_##id() \
@ -1871,8 +1859,6 @@ std::ostream& operator <<(std::ostream &os,const ParamState6<0, p1, p2, p3, p4,
SourceHook::PassInfo::V2Info paraminfos2_##id[6+1]; \
SourceHook::ProtoInfo protoinfo_##id = { 6, {0, 0, 0}, paraminfos_##id, \
SourceHook::ProtoInfo::CallConv_ThisCall, __SH_EPI, paraminfos2_##id }; \
\
CAutoReleaseHookMan g_Genc_ad##id(NULL);
#define THGM_SETUP_PI6(id, p1_type, p1_passtype, p1_flags, p2_type, p2_passtype, p2_flags, p3_type, p3_passtype, p3_flags, p4_type, p4_passtype, p4_flags, p5_type, p5_passtype, p5_flags, p6_type, p6_passtype, p6_flags) \
void setuppi_##id() \

View File

@ -371,8 +371,6 @@ std::ostream& operator <<(std::ostream &os,const ParamState$1<0@[$2,1,$1:, p$2@]
SourceHook::PassInfo::V2Info paraminfos2_##id[$1+1]; \
SourceHook::ProtoInfo protoinfo_##id = { $1, {0, 0, 0}, paraminfos_##id, \
SourceHook::ProtoInfo::CallConv_ThisCall, __SH_EPI, paraminfos2_##id }; \
\
CAutoReleaseHookMan g_Genc_ad##id(NULL);
#define THGM_SETUP_PI$1(id@[$2,1,$1:, p$2_type, p$2_passtype, p$2_flags@]) \
void setuppi_##id() \