Revert "Add natives to check for NULL_VECTOR and NULL_STRING"

This commit is contained in:
Asher Baker
2017-08-04 00:44:47 +01:00
committed by GitHub
parent 1924da3527
commit 11aab699a5
8 changed files with 16 additions and 339 deletions
-23
View File
@@ -759,27 +759,6 @@ static cell_t StoreToAddress(IPluginContext *pContext, const cell_t *params)
return 0;
}
static cell_t IsNullVector(IPluginContext *pContext, const cell_t *params)
{
cell_t *pNullVec = pContext->GetNullRef(SP_NULL_VECTOR);
if (!pNullVec)
return 0;
cell_t *addr;
pContext->LocalToPhysAddr(params[1], &addr);
return addr == pNullVec;
}
static cell_t IsNullString(IPluginContext *pContext, const cell_t *params)
{
char *str;
if (pContext->LocalToStringNULL(params[1], &str) != SP_ERROR_NONE)
return 0;
return str == nullptr;
}
REGISTER_NATIVES(coreNatives)
{
{"ThrowError", ThrowError},
@@ -808,7 +787,5 @@ REGISTER_NATIVES(coreNatives)
{"RequireFeature", RequireFeature},
{"LoadFromAddress", LoadFromAddress},
{"StoreToAddress", StoreToAddress},
{"IsNullVector", IsNullVector},
{"IsNullString", IsNullString},
{NULL, NULL},
};