restructure of HandleSys admin permissions and interface
removal of HandleSys helper functions removed useless BaseContext stuff from Engine put SourceMod specific stuff in BaseContext cleaned up broken Handle code --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40267
This commit is contained in:
@@ -252,11 +252,9 @@ int BaseContext::HeapRelease(cell_t local_addr)
|
||||
|
||||
int BaseContext::FindNativeByName(const char *name, uint32_t *index)
|
||||
{
|
||||
int diff, high, low;
|
||||
uint32_t mid;
|
||||
int high;
|
||||
|
||||
high = ctx->plugin->info.natives_num - 1;
|
||||
low = 0;
|
||||
|
||||
#if 0
|
||||
while (low <= high)
|
||||
@@ -786,3 +784,15 @@ int BaseContext::LookupLine(ucell_t addr, uint32_t *line)
|
||||
|
||||
return SP_ERROR_NONE;
|
||||
}
|
||||
|
||||
#if defined SOURCEMOD_BUILD
|
||||
SourceMod::IdentityToken_t *BaseContext::GetIdentity()
|
||||
{
|
||||
return m_pToken;
|
||||
}
|
||||
|
||||
void BaseContext::SetIdentity(SourceMod::IdentityToken_t *token)
|
||||
{
|
||||
m_pToken = token;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -44,6 +44,10 @@ namespace SourcePawn
|
||||
virtual int Execute(funcid_t funcid, cell_t *result);
|
||||
virtual void ThrowNativeErrorEx(int error, const char *msg, ...);
|
||||
virtual cell_t ThrowNativeError(const char *msg, ...);
|
||||
#if defined SOURCEMOD_BUILD
|
||||
virtual SourceMod::IdentityToken_t *GetIdentity();
|
||||
void SetIdentity(SourceMod::IdentityToken_t *token);
|
||||
#endif
|
||||
public: //IPluginDebugInfo
|
||||
virtual int LookupFile(ucell_t addr, const char **filename);
|
||||
virtual int LookupFunction(ucell_t addr, const char **name);
|
||||
@@ -52,6 +56,9 @@ namespace SourcePawn
|
||||
void SetErrorMessage(const char *msg, va_list ap);
|
||||
private:
|
||||
sp_context_t *ctx;
|
||||
#if defined SOURCEMOD_BUILD
|
||||
SourceMod::IdentityToken_t *m_pToken;
|
||||
#endif
|
||||
char m_MsgCache[1024];
|
||||
bool m_CustomMsg;
|
||||
bool m_InExec;
|
||||
|
||||
Reference in New Issue
Block a user