diff -r 7fab9b9222cb -r 9cb1a1fefc2c sourcepawn/jit/engine2.cpp --- a/sourcepawn/jit/engine2.cpp Sat Jan 31 22:51:48 2009 -0500 +++ b/sourcepawn/jit/engine2.cpp Sun Feb 01 02:03:03 2009 -0500 @@ -191,3 +191,22 @@ { 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 : ""); + + rt->ApplyCompilationOptions(NULL); + + return rt; +}