added a hacky way to get NULL references

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40944
This commit is contained in:
David Anderson
2007-06-15 20:23:40 +00:00
parent 6193ed8431
commit 6acaaac769
5 changed files with 51 additions and 6 deletions
+20 -1
View File
@@ -28,7 +28,7 @@
#include "sp_vm_types.h"
/** SourcePawn VM API Version */
#define SOURCEPAWN_VM_API_VERSION 2
#define SOURCEPAWN_VM_API_VERSION 3
#if !defined SOURCEMOD_BUILD
#define SOURCEMOD_BUILD
@@ -49,6 +49,16 @@ namespace SourcePawn
#define SM_PARAM_STRING_UTF8 (1<<0) /**< String should be UTF-8 handled */
#define SM_PARAM_STRING_COPY (1<<1) /**< String should be copied into the plugin */
#if defined SOURCEMOD_BUILD
/**
* @brief Pseudo-NULL reference types.
*/
enum SP_NULL_TYPE
{
SP_NULL_VECTOR = 0, /**< Float[3] reference */
};
#endif
/**
* @brief Represents what a function needs to implement in order to be callable.
*/
@@ -536,6 +546,15 @@ namespace SourcePawn
* @return Identity token.
*/
virtual SourceMod::IdentityToken_t *GetIdentity() =0;
/**
* @brief Returns a NULL reference based on one of the available NULL
* reference types.
*
* @param type NULL reference type.
* @return cell_t address to compare to.
*/
virtual cell_t *GetNullRef(SP_NULL_TYPE type) =0;
#endif
};