added ICallWrapper destruction

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40948
This commit is contained in:
David Anderson 2007-06-16 01:34:41 +00:00
parent 74a2a1498c
commit 8c96fdf7bc
3 changed files with 17 additions and 1 deletions

View File

@ -68,6 +68,11 @@ CallWrapper::~CallWrapper()
g_SPEngine->ExecFree(m_Addrs[ADDR_CODEBASE]);
}
void CallWrapper::Destroy()
{
delete this;
}
CallConvention CallWrapper::GetCallConvention()
{
return m_Cv;

View File

@ -49,6 +49,7 @@ public: //ICallWrapper
const PassInfo *GetReturnInfo();
unsigned int GetParamCount();
void Execute(void *vParamStack, void *retBuffer);
void Destroy();
public:
inline void deleteThis() { delete this; }
void *m_Addrs[4];

View File

@ -22,7 +22,7 @@
#include <IShareSys.h>
#define SMINTERFACE_BINTOOLS_NAME "IBinTools"
#define SMINTERFACE_BINTOOLS_VERSION 1
#define SMINTERFACE_BINTOOLS_VERSION 2
/**
* @brief Function calling encoding utilities
@ -105,13 +105,23 @@ namespace SourceMod
/**
* @brief Returns the number of parameters.
*
* @return Number of parameters.
*/
virtual unsigned int GetParamCount() =0;
/**
* @brief Execute the contained function.
*
* @param vParamStack A blob of memory containing stack data.
* @param retBuffer Buffer to store return value.
*/
virtual void Execute(void *vParamStack, void *retBuffer) =0;
/**
* @brief Destroys all resources used by this object.
*/
virtual void Destroy() =0;
};
/**