Beispiel #1
0
void csp::InitTests( lua::LuaState& state )
{
    lua::LuaStack& stack = state.GetStack();
    lua::LuaStackValue globals = stack.PushGlobalTable();

    InitializeCspObjectEnv( state, "TestSuite", testSuiteGlobals, testSuiteFunctions, globals );

    stack.Pop(1);
}
Beispiel #2
0
void csp::InitializeOpLua( lua::LuaState& state )
{
	InitializeCspObject( state, "CspOperation", cspOperationGlobals, cspOperationFunctions );

	lua::LuaStackValue metatable = PushCspMetatable( state.InternalState(), cspOperationFunctions );

	lua::LuaStack stack = state.GetStack();
	
	stack.PushInteger( WorkResult::FINISH );
	stack.SetField( metatable, "Finish" );
	
	stack.PushInteger( WorkResult::YIELD );
	stack.SetField( metatable, "Yield" );

	stack.Pop(1);
}