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
+19
View File
@@ -191,3 +191,22 @@ void SourcePawnEngine2::Shutdown()
{
g_Jit.ShutdownJIT();
}
IPluginRuntime *SourcePawnEngine2::CreateEmptyRuntime(const char *name, uint32_t memory)
{
int err;
BaseRuntime *rt;
rt = new BaseRuntime();
if ((err = rt->CreateBlank(memory)) != SP_ERROR_NONE)
{
delete rt;
return NULL;
}
rt->m_pPlugin->name = strdup(name != NULL ? name : "<anonymous>");
rt->ApplyCompilationOptions(NULL);
return rt;
}