engine/script/src/test/test_script_module.cpp
// NOTE: we don't generate actual bytecode for this test-data, so
// just pass in regular lua source instead.
we don't generate actual bytecode for this test-data, so
just pass in regular lua source instead.
we don ' t generate actual bytecode for this test - data so just pass in regular lua source instead .
static dmLuaDDF::LuaSource* LuaSourceFromText(const char *text)
{
    static dmLuaDDF::LuaSource tmp;
    memset(&tmp, 0x00, sizeof(tmp));
    tmp.m_Script.m_Data = (uint8_t*)text;
    tmp.m_Script.m_Count = strlen(text);
    tmp.m_Bytecode.m_Data = (uint8_t*)text;
    tmp.m_Bytecode.m_Count = strlen(text);
    tmp.m_Bytecode64.m_Data = (uint8_t*)text;
    tmp.m_Bytecode64.m_Count = strlen(text);
    tmp.m_Filename = "dummy";
    return &tmp;
}
static dmLuaDDF :: LuaSource * LuaSourceFromText ( const char * text ) { static dmLuaDDF :: LuaSource tmp ; memset ( & tmp , 0x00 , sizeof ( tmp ) ) ; tmp . m_Script . m_Data = ( uint8_t * ) text ; tmp . m_Script . m_Count = strlen ( text ) ; tmp . m_Bytecode . m_Data = ( uint8_t * ) text ; tmp . m_Bytecode . m_Count = strlen ( text ) ; tmp . m_Bytecode64 . m_Data = ( uint8_t * ) text ; tmp . m_Bytecode64 . m_Count = strlen ( text ) ; tmp . m_Filename = " " ; return & tmp ; }
NOTE: we don't generate actual bytecode for this test-data, so
just pass in regular lua source instead.
NOTE : we don ' t generate actual bytecode for this test - data so just pass in regular lua source instead .