gah GCC crying again

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401902
This commit is contained in:
Borja Ferrer 2008-02-23 20:50:26 +00:00
parent 4365d3763d
commit 1b26a1984a
2 changed files with 7 additions and 8 deletions

View File

@ -59,6 +59,8 @@
using namespace SourcePawn;
SourceHook::CPageAlloc g_ExeMemory(16);
#define ERROR_MESSAGE_MAX 25
static const char *g_ErrorMsgTable[] =
{
@ -100,7 +102,7 @@ const char *GetSourcePawnErrorMessage(int error)
return g_ErrorMsgTable[error];
}
SourcePawnEngine::SourcePawnEngine() : m_ExeMemory(16)
SourcePawnEngine::SourcePawnEngine()
{
m_pDebugHook = NULL;
m_CallStack = NULL;
@ -149,22 +151,22 @@ void *SourcePawnEngine::ExecAlloc(size_t size)
void *SourcePawnEngine::AllocatePageMemory(size_t size)
{
return m_ExeMemory.Alloc(size);
return g_ExeMemory.Alloc(size);
}
void SourcePawnEngine::SetReadExecute(void *ptr)
{
m_ExeMemory.SetRE(ptr);
g_ExeMemory.SetRE(ptr);
}
void SourcePawnEngine::SetReadWrite(void *ptr)
{
m_ExeMemory.SetRW(ptr);
g_ExeMemory.SetRW(ptr);
}
void SourcePawnEngine::FreePageMemory(void *ptr)
{
m_ExeMemory.Free(ptr);
g_ExeMemory.Free(ptr);
}
void SourcePawnEngine::ExecFree(void *address)

View File

@ -35,8 +35,6 @@
#include "sp_vm_api.h"
#include "sp_vm_function.h"
class SourceHook::CPageAlloc;
struct TracedCall
{
uint32_t cip;
@ -116,7 +114,6 @@ private:
TracedCall *m_FreedCalls;
TracedCall *m_CallStack;
unsigned int m_CurChain;
SourceHook::CPageAlloc m_ExeMemory;
//CFunction *m_pFreeFuncs;
};