gah GCC crying again
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401902
This commit is contained in:
parent
4365d3763d
commit
1b26a1984a
@ -59,6 +59,8 @@
|
|||||||
|
|
||||||
using namespace SourcePawn;
|
using namespace SourcePawn;
|
||||||
|
|
||||||
|
SourceHook::CPageAlloc g_ExeMemory(16);
|
||||||
|
|
||||||
#define ERROR_MESSAGE_MAX 25
|
#define ERROR_MESSAGE_MAX 25
|
||||||
static const char *g_ErrorMsgTable[] =
|
static const char *g_ErrorMsgTable[] =
|
||||||
{
|
{
|
||||||
@ -100,7 +102,7 @@ const char *GetSourcePawnErrorMessage(int error)
|
|||||||
return g_ErrorMsgTable[error];
|
return g_ErrorMsgTable[error];
|
||||||
}
|
}
|
||||||
|
|
||||||
SourcePawnEngine::SourcePawnEngine() : m_ExeMemory(16)
|
SourcePawnEngine::SourcePawnEngine()
|
||||||
{
|
{
|
||||||
m_pDebugHook = NULL;
|
m_pDebugHook = NULL;
|
||||||
m_CallStack = NULL;
|
m_CallStack = NULL;
|
||||||
@ -149,22 +151,22 @@ void *SourcePawnEngine::ExecAlloc(size_t size)
|
|||||||
|
|
||||||
void *SourcePawnEngine::AllocatePageMemory(size_t size)
|
void *SourcePawnEngine::AllocatePageMemory(size_t size)
|
||||||
{
|
{
|
||||||
return m_ExeMemory.Alloc(size);
|
return g_ExeMemory.Alloc(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourcePawnEngine::SetReadExecute(void *ptr)
|
void SourcePawnEngine::SetReadExecute(void *ptr)
|
||||||
{
|
{
|
||||||
m_ExeMemory.SetRE(ptr);
|
g_ExeMemory.SetRE(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourcePawnEngine::SetReadWrite(void *ptr)
|
void SourcePawnEngine::SetReadWrite(void *ptr)
|
||||||
{
|
{
|
||||||
m_ExeMemory.SetRW(ptr);
|
g_ExeMemory.SetRW(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourcePawnEngine::FreePageMemory(void *ptr)
|
void SourcePawnEngine::FreePageMemory(void *ptr)
|
||||||
{
|
{
|
||||||
m_ExeMemory.Free(ptr);
|
g_ExeMemory.Free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SourcePawnEngine::ExecFree(void *address)
|
void SourcePawnEngine::ExecFree(void *address)
|
||||||
|
@ -35,8 +35,6 @@
|
|||||||
#include "sp_vm_api.h"
|
#include "sp_vm_api.h"
|
||||||
#include "sp_vm_function.h"
|
#include "sp_vm_function.h"
|
||||||
|
|
||||||
class SourceHook::CPageAlloc;
|
|
||||||
|
|
||||||
struct TracedCall
|
struct TracedCall
|
||||||
{
|
{
|
||||||
uint32_t cip;
|
uint32_t cip;
|
||||||
@ -116,7 +114,6 @@ private:
|
|||||||
TracedCall *m_FreedCalls;
|
TracedCall *m_FreedCalls;
|
||||||
TracedCall *m_CallStack;
|
TracedCall *m_CallStack;
|
||||||
unsigned int m_CurChain;
|
unsigned int m_CurChain;
|
||||||
SourceHook::CPageAlloc m_ExeMemory;
|
|
||||||
//CFunction *m_pFreeFuncs;
|
//CFunction *m_pFreeFuncs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user