sourcepawn/jit/engine2.cpp
changeset 2545 9cb1a1fefc2c
parent 2378 d812052c5821
child 2783 5f333027ef04
     1.1 --- a/sourcepawn/jit/engine2.cpp	Sat Jan 31 22:51:48 2009 -0500
     1.2 +++ b/sourcepawn/jit/engine2.cpp	Sun Feb 01 02:03:03 2009 -0500
     1.3 @@ -191,3 +191,22 @@
     1.4  {
     1.5  	g_Jit.ShutdownJIT();
     1.6  }
     1.7 +
     1.8 +IPluginRuntime *SourcePawnEngine2::CreateEmptyRuntime(const char *name, uint32_t memory)
     1.9 +{
    1.10 +	int err;
    1.11 +	BaseRuntime *rt;
    1.12 +
    1.13 +	rt = new BaseRuntime();
    1.14 +	if ((err = rt->CreateBlank(memory)) != SP_ERROR_NONE)
    1.15 +	{
    1.16 +		delete rt;
    1.17 +		return NULL;
    1.18 +	}
    1.19 +
    1.20 +	rt->m_pPlugin->name = strdup(name != NULL ? name : "<anonymous>");
    1.21 +
    1.22 +	rt->ApplyCompilationOptions(NULL);
    1.23 +	
    1.24 +	return rt;
    1.25 +}