Added the ability for extensions to invoke arbitrary natives (bug 3605, r=ds,theY4Kman).

This commit is contained in:
David Anderson
2009-02-01 02:03:03 -05:00
parent c5ec369388
commit a017e4820a
17 changed files with 669 additions and 4 deletions
+15 -1
View File
@@ -42,7 +42,7 @@
/** SourcePawn Engine API Version */
#define SOURCEPAWN_ENGINE_API_VERSION 4
#define SOURCEPAWN_ENGINE2_API_VERSION 2
#define SOURCEPAWN_ENGINE2_API_VERSION 3
#if !defined SOURCEMOD_BUILD
#define SOURCEMOD_BUILD
@@ -876,6 +876,11 @@ namespace SourcePawn
* @return True on success, false on failure.
*/
virtual bool GetKey(int k, void **value) =0;
/**
* @brief Clears the last native error.
*/
virtual void ClearLastNativeError() =0;
};
@@ -1252,6 +1257,15 @@ namespace SourcePawn
* Initialize() succeeded.
*/
virtual void Shutdown() =0;
/**
* @brief Creates an empty plugin with a blob of memory.
*
* @param name Name, for debugging (NULL for anonymous).
* @param bytes Number of bytes of memory (hea+stk).
* @return New runtime, or NULL if not enough memory.
*/
virtual IPluginRuntime *CreateEmptyRuntime(const char *name, uint32_t memory) =0;
};
};