IPluginFunction implementation is re-entrant across native calls, as heap allocations are delayed until execution
removed ICallable::GetAddressOfPushedParam removed phys_addr from ICallable::PushArray fixed a bug where sp_context_t::n_idx was overwritten upon re-entrant calls --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40595
This commit is contained in:
+10
-6
@@ -37,7 +37,7 @@
|
||||
using namespace SourcePawn;
|
||||
|
||||
#define SMINTERFACE_FORWARDMANAGER_NAME "IForwardManager"
|
||||
#define SMINTERFACE_FORWARDMANAGER_VERSION 1
|
||||
#define SMINTERFACE_FORWARDMANAGER_VERSION 2
|
||||
|
||||
/*
|
||||
* There is some very important documentation at the bottom of this file.
|
||||
@@ -177,14 +177,10 @@ namespace SourceMod
|
||||
*
|
||||
* @param inarray Array to copy. Cannot be NULL, unlike ICallable's version.
|
||||
* @param cells Number of cells to allocate and optionally read from the input array.
|
||||
* @param phys_addr Unused. If a value is passed, it will be filled with NULL.
|
||||
* @param flags Whether or not changes should be copied back to the input array.
|
||||
* @return Error code, if any.
|
||||
*/
|
||||
virtual int PushArray(cell_t *inarray,
|
||||
unsigned int cells,
|
||||
cell_t **phys_addr,
|
||||
int flags=0) =0;
|
||||
virtual int PushArray(cell_t *inarray, unsigned int cells, int flags=0) =0;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -270,6 +266,14 @@ namespace SourceMod
|
||||
{
|
||||
return SMINTERFACE_FORWARDMANAGER_VERSION;
|
||||
}
|
||||
virtual bool IsVersionCompatible(unsigned int version)
|
||||
{
|
||||
if (version < 2 || version > GetInterfaceVersion())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
/**
|
||||
* @brief Creates a managed forward. This forward exists globally.
|
||||
|
||||
Reference in New Issue
Block a user